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.
Hello, I am new to PowerBI but I have been working on Microsoft Excel so I have an idea how to do it on Excel but I'm having an issue executing it on PowerBI. I hope you can help me.
Basically, I'm working on data that looks like this:
Column 1 | Column 2 | Column 3 |
Row 1 | 2 | Red |
Row 2 | 1 | Red |
Row 3 | 3 | Red |
Row 4 | 1 | Red |
Row 1 | 2 | Blue |
Row 2 | 1 | Blue |
Row 3 | 3 | Blue |
Row 4 | 1 | Blue |
I need a PowerBI formula that says IF Column 2 = 1, COUNT Column 1, FILTER BY Red ; IF Column 2 =2 , COUNT Column 1 DIVIDED BY 2, FILTER BY Red, IF Column 2=3, COUNT Column 1 DIVIDED BY 3, FILTER BY Red.
Basically, I'm using Column 2 as a category and a condition to dictate how to count the Column 1.
I hope my questions make sense and thank you for your help!
Solved! Go to Solution.
Hi,
I am not sure how your desired output looks like, but please check the below picture and the attached pbix file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hey, if you are trying to achieve that calculation would always divide by the value of Column2 then you could try this:
Thank you, JiHwan and Margarita. I really appreciate your help on this. Both of the solution works!
Hey, if you are trying to achieve that calculation would always divide by the value of Column2 then you could try this:
Hi,
I am not sure how your desired output looks like, but please check the below picture and the attached pbix file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
41 | |
19 | |
19 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |