The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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] )
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |