Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
chestercas
Helper I
Helper I

Distinct Count with true/false

Hi,

 

I have a table with custumer and a percent value.
I want to calculate the number of custumer who is under 50%.

My goal is to create a card graph, with this total. I tried many measure (countrows, countX...) But nothing is ok.

That mesure return me a empty value, or total value no filtered.
Capture PBI 2.PNG

My measure:

VAR bour = CALCULATE(DISTINCTCOUNT(DATA_BRMC[Nom prénom CC]),FILTER(DATA_BRMC,_txfac>0.5)
 
Thank you for your help !
4 REPLIES 4
Anonymous
Not applicable

Hi  @chestercas ,

 

Card Visual is equivalent to the Total row in the table, when the Total row is blank, Card Visual will also show blank, you can try the Sumx() function

You can create a Measure

Flag =
SUMX('DATA_BRMC',[VAR bour])

vyangliumsft_0-1688525500123.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you ! It doesn't work too...
I created 2 measures :

Bour test = CALCULATE(DISTINCTCOUNT(DATA_BRMC[Nom prénom CC]),FILTER(DATA_BRMC,_txFAC<0.5)
Nb dépo FAC = SUMX(DATA_BRMC,[bour test])


As you say, card takes blank rows...
So I show my 2 measures on a table. [BOUR] detect correctly txfac>0.5. But [nb dépo FAC] no... And also, it count all rows >0.5 in my table. I just want a "1" value on my select period... 😞

PBI 2.PNG


Thanks for your help and your time ! 🙂

 

mlsx4
Memorable Member
Memorable Member

Have you tried with:

 

bour= 
COUNTROWS(
  SUMMARIZE(
    FILTER(DATA_BRMC,_txfac>0.5),
    DATA_BRMC[Nom prénom CC]
  )

Hi,

Thanks for your help ! it doesn't work. I have empty result to. 😞

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.