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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HamidBee
Impactful Individual
Impactful Individual

The colour of my marker is not changing with my DAX measure

I am trying to change the coloir of this marker using the following DAX measure:

 

 

Colour.PeriodsCompleted = 
VAR Good = "Green"
VAR Okay = "Yellow"
VAR Bad = "Red"
VAR PC = [PC2]
VAR C =
    IF ( [PC2] = 2, Good, IF ( PC = 1, Bad, Okay ) )
RETURN
    C

 

 

But it doesn't seem to work. Please find attached the .pbix file.

1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!

Your mesures are working but you are missing the X-Axis on your visual. I added a new table like this:

PabloDeheza_0-1662727947681.png

And added the AorB column on the visual  like this:

PabloDeheza_1-1662728051255.png

And the visual is working!

PabloDeheza_2-1662728087295.png

Let me know if that helps!

View solution in original post

2 REPLIES 2
PabloDeheza
Solution Sage
Solution Sage

Hi there!

Your mesures are working but you are missing the X-Axis on your visual. I added a new table like this:

PabloDeheza_0-1662727947681.png

And added the AorB column on the visual  like this:

PabloDeheza_1-1662728051255.png

And the visual is working!

PabloDeheza_2-1662728087295.png

Let me know if that helps!

You definitely put me on the right track. Initally I wanted to plot only the measure on the x axis. I hadn't realised that it needs to be in the form of a table. So I created a table with only one row and column, linking that value to the measure. Here is the DAX for the table I created:

Table = {([PC2])}

 

Here is the chart:

 

HamidBee_0-1662880731669.png

 I also set value to 'Don't summarize'.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.