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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.