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
salonikhedkar_1
Helper II
Helper II

Conditional Formatting error

I do a target table. But it is not a date dimension. Its just a simple table of country, target, month and a concat field, concatenating country and month. Based on this concatenated field, I am joining this target table with my main table.

This works well. But breaks in conditional formatting. I have a measure which supports conditional formatting. the formula is as follows:

TARGET_MEASURE =
var TARGET = SELECTCOLUMNS(TargetTable, "TARGET", TargetColumn)
RETURN

SWITCH(TRUE(),
TARGET>= Amount,1,
TARGET<= Amount,2,
ISBLANK(Amount),3)

------------------------------------------------------------------------------------------
This formula compared target vs amount, if target is higher than amount, then 1.....and so on. 
It worked well when I had a Target column in my existing table. But when I made a separate Target table, it is consideing consition1 and Blanks as 1

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @salonikhedkar_1 

If you create a seperate target table which has only "target" field and it doesn't has any relationship with your main table, the conditional formatting measure wouldn't work by default.

Please feel free to ask me further.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft 

There is a relationship between the two tables. 

Hi @salonikhedkar_1 

It is appreciated to share some sample data for further analysis.

 

Best Regards

Maggie

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.