The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table in which I calculated the cumulative quantity in DAX:
Cumul quantity = calculate (SUM('table_fact'[Quantityu]), DATESYTD('table_calendar'[Date]))
I have a problem that I can't solve, when I have an empty value, I want to replace it with the previous value.
In my example, I have no data after January 2023 so all years after February 2023 will take the previous value, i.e. 5. How can I solve this problem?
THANKS
Even if its direct query, the formula should work. In above case the fact table is direct query and date table is static.
Hope this will work.....
Hi @Rupak_bi ,
I'm on DirectQuery Mode and your formula doesn't work.
1. I create a measure which calculate the cumul like this :
Cumul quantity = calculate (SUM('table_fact'[Quantityu]),
DATESYTD('table_calendar'[Date]))
When i want to use this measure in calculate like your example, it's doesn't work
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
21 | |
14 | |
14 | |
9 | |
7 |