Forum Discussion
Can someone help with DAX Script?
Hello everyone, I am looking for some help in writting a DAX that will give me the following result:
Ideal result = calculate number of activity IDs that have changed status from Not Started to In Progress between Sep 15 and Sep 16.
Ideally i would like to compare this measure for more than two days and plot the measure over dates that are presneted in Column 1.
Sample Dataset is here:
| Date | Activity ID | Activity Status |
| 15 sep 2021 | A | Not Started |
| 15 sep 2021 | B | Not Started |
| 15 sep 2021 | C | Not Started |
| 15 sep 2021 | D | In Progress |
| 15 sep 2021 | E | In Progress |
| 16 sep 2021 | A | Not Started |
| 16 sep 2021 | B | In Progress |
| 16 sep 2021 | C | In Progress |
| 16 sep 2021 | D | In Progress |
| 16 sep 2021 | E | In Progress |
2 Replies
- Jihwan_KimSuper User
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the link down below, that is the sample pbix file.
Ideal result measure : =
VAR newtable =
ADDCOLUMNS (
VALUES ( Data[Activity ID] ),
"@statuschange",
CALCULATE (
IF (
COUNTROWS ( SUMMARIZE ( Data, Data[Activity ID], Data[Activity Status] ) ) > 1,
1
)
)
)
RETURN
SUMX ( newtable, [@statuschange] ) - CNENFRNLCommunity Champion
Status Transition = SUMX ( DISTINCT ( INFO[Activity ID] ), 0 + ( CALCULATE ( DISTINCTCOUNT ( INFO[Activity Status] ) ) > 1 ) )