The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Solved! Go to Solution.
@amittal1 , Try using below DAX
Active_controlled = CALCULATE(
COUNT('Sheet1 (2)'[placebo]),
FILTER('Sheet1 (2)', 'Sheet1 (2)'[placebo] = "Active-control trial")
)
Proud to be a Super User! |
|
Hi @amittal1 ,
I tested the measure of bhanu_gautam and it works fine.
Here's my test data:
Output:
As dharmendars007 mentioned, did you apply a filter or did you use a slicer? You can create a table visual, place it on the same page as the card visual, and see if the output is correct.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amittal1 ,
I tested the measure of bhanu_gautam and it works fine.
Here's my test data:
Output:
As dharmendars007 mentioned, did you apply a filter or did you use a slicer? You can create a table visual, place it on the same page as the card visual, and see if the output is correct.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , thanks for your care. I used a card for another value as well from the same column, may be that's the reason I am unable to do it for another value from the same column. So, I instead used slicer to show the total count. And, yes as you have tested bhanu's method I will mark it as an answer.
@amittal1 , Try using below DAX
Active_controlled = CALCULATE(
COUNT('Sheet1 (2)'[placebo]),
FILTER('Sheet1 (2)', 'Sheet1 (2)'[placebo] = "Active-control trial")
)
Proud to be a Super User! |
|
Hi bhanu, thanks for you answer, but this is again showing blank in the card. Just one thing to ask you, can we create more than one measure using a column, i think yes right, so I created this measure for the column values with placebo-control trial, that worked, but for active-control trial it didnt worked, dont know why.
Hi @dharmendars007, thanks for your reply, I used a slicer instead, I think the problem was arising may be because I used a card already for another value(Placebp control trial) in the same column (placebo), and there might be something preventing me to use another card for the same column with different value.
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |