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 All,
I need help to create a measure in dax.
My problem is I need to create a bar chart to show Count of "Columns" by "Category" it is simple, but I need to only count columns of latest records for each Dataset according date slicer filter .
As you can see on image below i have a sample of results with different dates slicer .
I can't use distinctcount(Column), because there are different categories with the same column.
Thank you.
Solved! Go to Solution.
Thanks for your reply
I managed to do it using this measure below
SUMX(
ADDCOLUMNS(
VALUES(Registration[Dataset]),
"Count",
VAR vDataMax =
CALCULATE(
MAX(Registration[Date]),
ALLEXCEPT(Registration, Registration[Dataset]), 'Date'[Date] >= MIN('Date'[Date]) && 'Date'[Date] <= MAX('Date'[Date])
)
RETURN
COUNTROWS(
FILTER(
SUMMARIZE(
Registration,
Registration[Date],
Registration[Dataset],
Registration[Column],
Registration[Type]
),
Registration[Date] = vDataMax
)
)
),
[Count]
)
@hmattje , refer if these can help
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Thanks for your reply
I managed to do it using this measure below
SUMX(
ADDCOLUMNS(
VALUES(Registration[Dataset]),
"Count",
VAR vDataMax =
CALCULATE(
MAX(Registration[Date]),
ALLEXCEPT(Registration, Registration[Dataset]), 'Date'[Date] >= MIN('Date'[Date]) && 'Date'[Date] <= MAX('Date'[Date])
)
RETURN
COUNTROWS(
FILTER(
SUMMARIZE(
Registration,
Registration[Date],
Registration[Dataset],
Registration[Column],
Registration[Type]
),
Registration[Date] = vDataMax
)
)
),
[Count]
)
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |