Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
here is a simplified example of the real scenario.
Example pbix file can be downloaded here.
Let's say that staff is being evaluated on certain aspect on monthly basis.
However, it is possible that staff is evaluated more than once during a month.
Report is simple - it has Reporting Month slicer and a table.
Requirement here is to add a Card visual that should display number of staff whose result is greater than 5.
If the staff has been evaluated more than once in a month, only the last result (in selected month) should be considered.
For example, when January is selected, the result should be 5.
There are 5 people whose last result was greater than 5.
Note: Last response by user in selected month is highlighted in yellow.
In February, result should be 3.
There are 3 people whose last result was greater than 5.
Thank you!
Solved! Go to Solution.
# Staff =
COUNTROWS (
FILTER (
DISTINCT ( Staff[UserID] ),
CALCULATE ( MAXX ( TOPN ( 1, 'Table', 'Table'[Date] ), 'Table'[Result] ) ) > 5
)
)
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! |
# Staff =
COUNTROWS (
FILTER (
DISTINCT ( Staff[UserID] ),
CALCULATE ( MAXX ( TOPN ( 1, 'Table', 'Table'[Date] ), 'Table'[Result] ) ) > 5
)
)
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! |
User | Count |
---|---|
107 | |
88 | |
81 | |
76 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |