Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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]
)