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!View all the Fabric Data Days sessions on demand. View schedule
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]
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!