Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have the following measure that counts the number of appointments in the coming 6 months.
Rolling 6 month = CALCULATE(COUNT(Afspraken[Datum afspraak]),
DATESINPERIOD(Afspraken[Datum afspraak], TODAY(), 6, MONTH))
This gives the following result when date is added to the table:
I want to see the totals. So the following:
Date | Number of appointments |
13-07-2021 | 1430 |
14-07-2021 | 1438 |
How can I achieve this?
Solved! Go to Solution.
Hi @Sohan ,
You can try the measure like this:
Measure =
CALCULATE(
SUMX( ALLSELECTED('Table'[Datum]), [Rolling 6 month] ),
DATESINPERIOD(
'Table'[Datum],
MAX('Table'[Datum]),
6,
MONTH
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sohan ,
You can try to add an IF condition to these measures, like this:
Measure =
IF(
MAX('Table'[Datum]) <= TODAY(),
CALCULATE(
SUMX( ALLSELECTED('Table'[Datum]), [Rolling 6 month] ),
DATESINPERIOD(
'Table'[Datum],
MAX('Table'[Datum]),
6,
MONTH
)
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
Hi @Sohan ,
You can try the measure like this:
Measure =
CALCULATE(
SUMX( ALLSELECTED('Table'[Datum]), [Rolling 6 month] ),
DATESINPERIOD(
'Table'[Datum],
MAX('Table'[Datum]),
6,
MONTH
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, this works! When I try to make a line chart, I get this:
I want to see the values up until today. When I add the date filter, I get different values. Do you know why this happens?
Hi @Sohan ,
You can try to add an IF condition to these measures, like this:
Measure =
IF(
MAX('Table'[Datum]) <= TODAY(),
CALCULATE(
SUMX( ALLSELECTED('Table'[Datum]), [Rolling 6 month] ),
DATESINPERIOD(
'Table'[Datum],
MAX('Table'[Datum]),
6,
MONTH
)
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
79 | |
61 | |
60 | |
58 |
User | Count |
---|---|
151 | |
113 | |
99 | |
80 | |
72 |