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
Anonymous
Not applicable

Filtering difference

So I think I have the solution. The formula below works as I want it to using the quick measure option. The only problem is I am forced to us 'IN' and list All the ITEMS in side{ " "}. I tried taking that part out and using just  DISTINCTCOUNT('VBISALES (2)'[BICUST]),
        'VBISALES (2)'[BIITEM])
 
 
hoever this did not work how do I use BIITEM without IN {""} 
 
 
The formula is below in full
 
Thanks 
 
Difff =
VAR __BASELINE_VALUE =
    CALCULATE(
        DISTINCTCOUNT('VBISALES (2)'[BICUST]),
        'VBISALES (2)'[BIITEM] IN { "10009", "10006" }
    )
VAR __MEASURE_VALUE = DISTINCTCOUNT('VBISALES (2)'[BICUST])
RETURN
    __MEASURE_VALUE - __BASELINE_VALUE
5 REPLIES 5
Anonymous
Not applicable

Im looking for all values regardless of slicers.. Basically when I use quiclk measure it has me select my parameters and I dont want to individually do that.. as you can see it comes up with an automated formuala. there are over 3000 items and i just want to see if there is a way to select them all together. 

Anonymous
Not applicable

alifazal_1-1628702588795.png

so the Select a value at the bottom is what I am forced to use and individaully select, what if i just wanted all 

 

AlexisOlson
Super User
Super User

How do should we determine which items to include in the baseline if you don't want to hard code them specifically? Are they chosen via slicer or do you want all values regardless of slicers or what?

Anonymous
Not applicable

 

Im looking for all values no slicers have been applied .. Basically when I use quick measure it has me select my parameters and I dont want to individually do that.. as you can see it comes up with an automated formuala. there are over 3000 items and i just want to see if there is a way to select them all together. 

 

alifazal_1-1628705087681.png

 

If you want all, then using ALL seems appropriate:

Difff =
VAR __BASELINE_VALUE =
    CALCULATE (
        DISTINCTCOUNT ( 'VBISALES (2)'[BICUST] ),
        ALL ( 'VBISALES (2)'[BIITEM] )
    )
VAR __MEASURE_VALUE = DISTINCTCOUNT ( 'VBISALES (2)'[BICUST] )
RETURN
    __MEASURE_VALUE - __BASELINE_VALUE

 

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.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors