Forum Discussion
Get Measure value based on condition DAX
But the Energy is measure not column. How I can calculate the sum of current energy and previous row energy?
Here is the Pbix file and excel file link
Well, in that case, you create a table variable using SUMMARIZE or GROUPBY that is essentially the same as your visualization. You use ADDCOLUMNS to add your measure as a column. You then use ADDCOLUMNS again to add your cumulative measure as a column. You then can filter down to the correct row in the table.
The technique is essentially laid out here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
- phoisan6 years agoHelper I
I'm not really understand how to do it. I'm new to the Power BI.
I'll try to understand the articles you shared .
Thanks
- Greg_Deckler6 years agoCommunity Champion
phoisan I really felt more like going to bed rather than downloading another PBIX tonight, but here you go, updated PBIX is attached below the sig.
Energy Cumulative = VAR __Seq = MAX('Test'[Seq]) VAR __Table = SUMMARIZE( FILTER(ALL('Test'),[Seq]<=__Seq), [Seq], "Energy",[Energy] ) RETURN SUMX(__Table,[Energy])- phoisan6 years agoHelper I
This is brilliant....fixed my problem. thanks
This issue had been stuck me for past three days!