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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Black_magic100
Helper III
Helper III

Help with very simple DAX code

Okay so I have a table that contains the following columns (these are not actual names):

 

1) mainID  (a unique primary key ID)

2) Count1 (A simple DISTINCTCOUNT measure of an ID of a DIFFERENT table than above)

3) Count3 (A simple DISTINCTCOUNT measure of an ID of a DIFFERENT table than above)

4) FinalCount (This is simple a sum of the two measures above)

 

Now when I add these to a single table I get 5 rows because I am aggregating by the mainID.

 

However, when I add my final measure, which is seen below:

XXXXXX = SWITCH ( TRUE(), [yyyyyyyyy] <= 23, 40, [yyyyyyyyy] <= 35, 70, [yyyyyyyyy] <= 42, 100, [yyyyyyyyy] >= 43, 125, "Invalid")
 
I get a table that is now iterating through a ton of different values and the result is always showing 40 most likely because it is only counting 1 value?  I feel like this should be very simple, but for whatever reason that last SWITCH() statement is not wanting to just look at the final column and add the appropriate 5 rows.
3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Black_magic100 ,

 

Did you try to put the meausre [yyyyyyyyy] in your visual to check the value of that? 

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @Black_magic100 ,

 

Has your issue been solved? If so, kindly mark my answer as a solution to close the case. If any other question, feel free to let me know please.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
TomMartens
Super User
Super User

Hey,

 

maybe this is because the mystery measure [yyyyyyyyy] always equals 23.

 

It seems necessary that you provide a pibx with some sample data (use the function Enter data), upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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