Forum Discussion
JayPee
4 years agoRegular Visitor
Dax function for calculation using Previous value
Hi, I am trying to achive the "Expected result" column in below table in one my Power Bi table, Kindly suggest is it possible to achive(Since I am new to Power Bi not sure about the correct funct...
- 4 years ago
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Expected result measure: = VAR _countmeasure = [Count measure:] VAR _result = SUMX ( FILTER ( ALL ( Data ), Data[Roll No] <= MAX ( Data[Roll No] ) ), Data[Basket A] + Data[Basket B] - Data[Basket C] ) RETURN IF ( HASONEVALUE ( Data[Roll No] ), _countmeasure + _result )
Jihwan_Kim
4 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Expected result measure: =
VAR _countmeasure = [Count measure:]
VAR _result =
SUMX (
FILTER ( ALL ( Data ), Data[Roll No] <= MAX ( Data[Roll No] ) ),
Data[Basket A] + Data[Basket B] - Data[Basket C]
)
RETURN
IF ( HASONEVALUE ( Data[Roll No] ), _countmeasure + _result )
- JayPee4 years agoRegular Visitor
Thank you Jihwan_Kim It worked in my report as well. 🙂