Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
Status Transition =
SUMX (
DISTINCT ( INFO[Activity ID] ),
0 + ( CALCULATE ( DISTINCTCOUNT ( INFO[Activity Status] ) ) > 1 )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
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] )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |