Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
I have a SP connected to PBI report and there is coulmn that have certain values (1,2,3,4)
i would like to know how many rows that have value of "1" and "2"
how to do that ?
Solved! Go to Solution.
Hi @MostafaGamal ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR tmp =
FILTER ( ALL ( 'Table' ), 'Table'[Rating] IN { 1, 2 } )
RETURN
COUNTROWS ( tmp )
3. add a card visual with measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MostafaGamal ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR tmp =
FILTER ( ALL ( 'Table' ), 'Table'[Rating] IN { 1, 2 } )
RETURN
COUNTROWS ( tmp )
3. add a card visual with measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Try this but put the column name in the measure:
measure = calculate(count(columnName),columnName =1 || columnName = 2)
If I answered your question, please mark my post as solution, Appreciate your Kudos!
Proud to be a Super User! | |
i use the formula but it gives me an error
@MostafaGamal
The below might help you
https://community.powerbi.com/t5/Desktop/CountIf-in-PB/td-p/1317714
Can you please explain more, i dont have much experince on PBI
@MostafaGamal Please share the sample data or pbix file (after removing all the sensitive information). With the desired output to help you better.
there is a snapshot for the table i use its called "answers"
i want to know how many rows of column called "Rating" that have the value of "2" and "1"
User | Count |
---|---|
95 | |
86 | |
78 | |
72 | |
67 |
User | Count |
---|---|
110 | |
104 | |
84 | |
65 | |
63 |