Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi There,
I need help with 3 dynamic formulas for the below table. I do have a date table which is connected with the Delivery Date.
1: I need total order amount between previous 2nd and Previous 5th Month (i dont want to hard key the dates)
2: I need total order amount where date is higher/older than 6 months.
3: I need total order amount where date is null or left blank.
Solved! Go to Solution.
HI @Rubal_Islam,
You can add a calculated column to check the current date and system date to remark flag then use this flag as a condition to coding formula to aggeration record amounts.
Calculate column flag:
Flag =
VAR diff =
DATEDIFF ( 'Table'[Date], TODAY (), MONTH )
RETURN
IF (
'Table'[Date] <> BLANK (),
SWITCH (
TRUE (),
diff >= 6, "Over 6 Months",
diff < 6
&& diff >= 2,
"Previous 2nd ~ 5th Months",
diff = 1, "Previous Months",
diff = 0, "Current Month",
"Furture Month"
),
"Null"
)
Measure formula:
formual =
CALCULATE (
SUM ( Table[Amount] ),
ALLSELECTED ( Table ),
VALUES ( Table[Flag] )
)
Regards,
Xiaoxin Sheng
HI @Rubal_Islam,
You can add a calculated column to check the current date and system date to remark flag then use this flag as a condition to coding formula to aggeration record amounts.
Calculate column flag:
Flag =
VAR diff =
DATEDIFF ( 'Table'[Date], TODAY (), MONTH )
RETURN
IF (
'Table'[Date] <> BLANK (),
SWITCH (
TRUE (),
diff >= 6, "Over 6 Months",
diff < 6
&& diff >= 2,
"Previous 2nd ~ 5th Months",
diff = 1, "Previous Months",
diff = 0, "Current Month",
"Furture Month"
),
"Null"
)
Measure formula:
formual =
CALCULATE (
SUM ( Table[Amount] ),
ALLSELECTED ( Table ),
VALUES ( Table[Flag] )
)
Regards,
Xiaoxin Sheng
I have sorted out the Null Date as per below
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |