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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.