The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello DAX master,
I am currently stuck.
I have this table, with 3 columns PartNumber, Month and Changed.
I want to count Changed = Yes, for each PartNumber and display the results in a visual where it shows the for the month the count of PartNumber with count Changed = Yes is greater than 1.
PartNumber , Month , Changed
A , Jan , Yes
A , Jan , Yes
A , Jan , Yes
A , Feb , Yes
A , Feb , No
A , Feb , Yes
A , Feb , Yes
A , Feb , No
B , Jan , Yes
B , Jan , Yes
B , Feb , No
B , Feb , Yes
B , Feb , No
Table where CountYes > 1 for PartNumber
The visual I need to create
Jan Feb
Count of PartNumber with Count = Yes > 1 2 1
Any and all assistance is much appreciated.
Solved! Go to Solution.
Hi @ZeeMTee
You can add a flag column, which you can use as a filter.
It returns "yes" if the same part in the same month has more than 1 yes.
Dax formula for this calculated column :
As you have it you can use it to filter your matrix :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi,
Thanks for assisting.
If I do a Pivot of the data and filter for Changed = Yes. I will get this result.
The cells in yellow should be discard as the count of Changed < 1.
From this table I would do COUNTA for respective months, and would get this table
The final table should look like this
Here is the sample data
PartNumber | Month | Changed |
A | Jan | Yes |
A | Jan | Yes |
A | Jan | Yes |
A | Feb | Yes |
A | Feb | No |
A | Feb | Yes |
A | Feb | Yes |
A | Feb | No |
B | Jan | Yes |
B | Jan | Yes |
B | Feb | No |
B | Feb | Yes |
B | Feb | No |
C | Jan | Yes |
C | Jan | No |
C | Jan | No |
C | Jan | No |
C | Jan | No |
C | Feb | Yes |
C | Feb | No |
C | Feb | Yes |
C | Feb | Yes |
C | Feb | Yes |
D | Jan | Yes |
D | Jan | Yes |
D | Jan | Yes |
D | Feb | No |
D | Feb | No |
D | Feb | No |
Hi @ZeeMTee
You can add a flag column, which you can use as a filter.
It returns "yes" if the same part in the same month has more than 1 yes.
Dax formula for this calculated column :
As you have it you can use it to filter your matrix :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Thanks I have added another measure to CountOfYes = "Yes", so that I can get the PartNumber count.
I'm sorry I don't understand what you're trying to do.
Could you please attach a picture of the desired result based on your sample data?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
80 | |
66 | |
53 | |
52 |
User | Count |
---|---|
121 | |
116 | |
77 | |
64 | |
63 |