add Pre and Post period checking
Browse files
apps/kpi_analysis/trafic_analysis.py
CHANGED
|
@@ -290,6 +290,16 @@ if not all([two_g_file, three_g_file, lte_file]):
|
|
| 290 |
st.info("Please upload all 3 reports and select the comparison periods.")
|
| 291 |
st.stop()
|
| 292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
if st.button("🔍 Run Analysis"):
|
| 294 |
|
| 295 |
df_2g = read_uploaded_file(two_g_file)
|
|
|
|
| 290 |
st.info("Please upload all 3 reports and select the comparison periods.")
|
| 291 |
st.stop()
|
| 292 |
|
| 293 |
+
# Warning if pre and post periode are the same
|
| 294 |
+
if pre_range == post_range:
|
| 295 |
+
st.warning("⚠️ Pre and post periode are the same.")
|
| 296 |
+
st.stop()
|
| 297 |
+
|
| 298 |
+
# Warning if pre and post are overlapping
|
| 299 |
+
if pre_range[0] < post_range[0] and pre_range[1] > post_range[1]:
|
| 300 |
+
st.warning("⚠️ Pre and post periode are overlapping.")
|
| 301 |
+
st.stop()
|
| 302 |
+
|
| 303 |
if st.button("🔍 Run Analysis"):
|
| 304 |
|
| 305 |
df_2g = read_uploaded_file(two_g_file)
|