March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all, hoping you can help me with something...
Say I have Table1, with the below columns:
I've written this measure, and by written, I mean copied off the internet somewhere and can't remember where:
cumulative =
CALCULATE(
COUNTA(Table1[id]),
FILTER(
ALLSELECTED(Table1[date]),
ISONORAFTER(Table1[date], MAX(Table1[date]), DESC)
)
)
Which then produces this visual by adding the date column to the x-axis, and the measure as a line value:
So my question is: How can I incorporate a second filter where the column "type" is "A"?
The aim is to replace this singular line with 4, one for each type, "A", "B", "C" & "D"
Thank you in advance!
Solved! Go to Solution.
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Hi @jwillis07 ,
Please try this:-
cumulative =
CALCULATE(
COUNTA(Table1[id]),
FILTER(
ALLSELECTED(Table1[date]),
ISONORAFTER(Table1[date], MAX(Table1[date]), DESC) &&
Table1[type] in {"A","B","C","D"}
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi, thanks for the response. Tried this but it doesn't seem to work unfortunately as it won't allow me to add Table1[type] - the type part is greyed out.
I think maybe it's something to do with the ALLSELECTED part.
Whenever I type... Table1[ ... The autofill options only show me the table, the date column and a different measure in this table - won't allow me to enter any other column names.
You can simply use page filter by selecting type A,B, or C
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Hi, thanks for the response. Yeah you're right in that I could just apply add 'type' to the page filter but that wouldn't allow for me to have 4 lines in one visual, one for each type.
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Yep, this is it. Thank you very much, really appreciate it.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |