Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
I have a strange issue when trying to apply a conditionnal background color for a button.
I created a measure that calculates the sum of a binary column (1 . 0) and returns 1 if the sum is superior to 1 and 0 if not.
Currently this column has only "0" so it is obvious to have a "red" Color
However, this is not the case as the button returns light blue as configured for "1" value. And the most interesting part is the measure returns "0" on Card visual. see image below ;
How that can be possible ?
Note that there is currently no filter applied.
Thanks .
Solved! Go to Solution.
The issue has been solved when i removed the measure to the same table where related columns are !
I thought the measure is not impacted with where it has been created ....
The issue has been solved when i removed the measure to the same table where related columns are !
I thought the measure is not impacted with where it has been created ....
That is correct. While measures have a "host table" that is not relevant for the computations.
Don't conflate "table" and "table visual" though - these are different concepts.
Yes I know ! but it was the case for me
If I were you I would not be satisfied with that. There must be a different reason for the observed behavior.
Hi @zzinoun ,
Please make sure the binary column is a column in your data model. I think [Bg Color DM ET5] should be a easy measure based on binary column with IF function. Here I create a sample to have a test.
Measure:
Measure =
VAR _SUM = CALCULATE(SUM('Table'[binary]))
RETURN
IF(_SUM>1,1,0)
Background setting:
Result is as below. It works.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This will depend on the filter context that you have imposed on the button. Please provide more details, or a sample pbix that demonstrates the issue.
User | Count |
---|---|
100 | |
66 | |
58 | |
47 | |
46 |