Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm trying to create a table where I have a column with values accumulated by product since the beginning of the month and need the value of only the day in a new column. I do not know if a new column or a measurement which is the right/efficient one. What i want to do is a slicer that user chooses to see the values accumulated or daily.
I think the function to use is EARLIER, but I do not know how.
Can you help me?
Thanks
Solved! Go to Solution.
Hi @Fred_PT,
You can create a calculated column like below:
Value daily = var pre= CALCULATE(MAX(Table1[Value accum]), FILTER('Table1','Table1'[Product]=EARLIER(Table1[Product]) && 'Table1'[Date]<EARLIER('Table1'[Date])))
return 'Table1'[Value accum]-pre
Or create a measure:
Measure = var p=CALCULATE(MAX('Table1'[Value accum]),FILTER(ALL('Table1'),'Table1'[Product]=MAX('Table1'[Product]) && 'Table1'[Date]<MAX('Table1'[Date])))
return MAX(Table1[Value accum])-p
Best Regards,
Qiuyun Yu
Hi @Fred_PT,
You can create a calculated column like below:
Value daily = var pre= CALCULATE(MAX(Table1[Value accum]), FILTER('Table1','Table1'[Product]=EARLIER(Table1[Product]) && 'Table1'[Date]<EARLIER('Table1'[Date])))
return 'Table1'[Value accum]-pre
Or create a measure:
Measure = var p=CALCULATE(MAX('Table1'[Value accum]),FILTER(ALL('Table1'),'Table1'[Product]=MAX('Table1'[Product]) && 'Table1'[Date]<MAX('Table1'[Date])))
return MAX(Table1[Value accum])-p
Best Regards,
Qiuyun Yu
Hi Qiuyun Yu,
Solved wonderfully!! Thank you very much for your quick response.
Best regards,
Fred
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |