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.
Hi everyone,
Below is a table I have made illustrating the total views per id, where whenever someone is 1st, 2nd or 3rd I am displaying a unichar instead.
What I would like as shown in the second picture, is to be able to count how many times someone had been first over a month.
E.g When having dates for November, id(ieg) is 1st, where I would be able to count and put a number for all times someone has been 1st. (In december (next month), it could be that ieg will not be first, but he still should have 1 in his warehouse from last month. Progressively, the new person getting the 1st in december, he should get 1 in his warehouse.
Could someone help on how to write that formula?
Thanks a lot in advance 🙂
Assuming the measure [Rank] calcuated the rank by # views properly (and not swapping 1 - 3 for your UNICHAR...which is a really slick idea!), try this measure:
Warehouse of Trophies =
// For each ID, create a table that calculates the view rank for each month in the current filter context
VAR Rank_by_Month =
ADDCOLUMNS(
VALUES(dim_Calendar[Month])
,"View Rank", [Rank]
)
// Only keep the months where the product was ranked # 1
VAR Months_Top_Rank =
FILTER(
Rank_by_Month
,[View Rank] = 1
)
// Count the number of times the product was ranked #1
VAR Result =
COUNTROWS(Months_Top_Rank)
RETURN
Result
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |