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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

SWITCH(True()) Measure Incorrectly Categorizing due to overlapping '&&' conditions

Hi All,

 

I am using the following measure to bucket movement between two scores overtime under a few categories

switch.PNG

However by the looks of results, my categories seem to bucket these criteria all over the place. Following are my actual results (on top) Vs. my calculation on excel. (bottom)

counts.PNGcorrect.PNG

(The totals seem to be correct at 994 each)

Please help me correct this bucketing measure. Thanks

 

[I am only getting the spill or the "NA" category correcty (which is embarassing)

I am comparing, conditioning the following criteria in the measure:


the Start Date and End dates

the Score at Start Date and End Date

The score (scored out of 4)]

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi All,

 

I was able to think through and find a way to correctly bucket my data. Turns out my data buckets needed to be defined more presicsely. ALLSELECTED was a lifesaver for me to work with my time ranges. following is the corrected version of my Select TRUE function. Hope this helps, 

Capture.PNG

 

Thanks

 

 

 

View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous ,

 

To what I can understand you are calculating the count of values for each bucket being the bucket created by a measure is this correct?

 

Be aware that measures are context sensitive so when the context changes the calculations change has you can see no the last column that you have a Moved Up bucket (in theory on the total line the bucket should not exist).

 

can you share a sample file?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Hi All,

 

I was able to think through and find a way to correctly bucket my data. Turns out my data buckets needed to be defined more presicsely. ALLSELECTED was a lifesaver for me to work with my time ranges. following is the corrected version of my Select TRUE function. Hope this helps, 

Capture.PNG

 

Thanks

 

 

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.