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.
I am using the below table for reporting where the Product is coming from a product table and Q1Sales, Q2Sales,Q3Sales,Q4Sales are measures calculated using date and Sales Data
I need to do conditional formatting for each Product (each row)
Suppose for-
Apple if 1000-5000-> Red, 5001-8000-> Yellow, 8001+ -> Green
Samsung if 1000-5000-> Red, 5001-10000-> Yellow, 10000+ -> Green
OnePlus if 1000-4000-> Red, 4001-8000> Yellow, 8000+ -> Green
MI if 1000-8000-> Red, 8001-10000-> Yellow, 8000+ -> Green
When I am trying to do this, I am not able to use multiple conditional formatting for the same measures.
Can we use some DAX for this?
create varflag as measure and use sum(varflag) for conditional formatting
Hi @srlabhe123, Whenever I am trying to write the above Dax as a measure, It is giving me an error.
And If we try to create multiple calculated columns for each product and apply them to each measure then it is also causing a circular dependency error.
This means, I have created a column for Samsung and applied that column for conditional formatting for Q1Sales
and when I am trying to create a column for Apply and applying that for conditional formatting of Q2Sales it is giving a circular dependency error
Could you please share the pbix with measure and columns that can work for all measures (Q,Q2,Q3 and Q4)
Aldo, whatever column I am creating inside the model and trying to use in Power Bi for conditional formatting is not working means no color formatting is applying. The calculated column is grayed out
@srlabhe123 , could you tell me what is wrong if my source is Azure analysis service as whatever column I am creating is getting grayed out?
Also If you try to create calculate column, It will give you dependency error If you will start writing logic for Q2Sales
Create VarFlag as measure and use sum(varflag) to setup formatting
First, decide and choose which variable will affect value color or background cell color, In this case you will choose sum of sale, and put your condition accordingly,
In my screen, I used as % value of total sales with the same format. I just want to show data bars in different colors accordingly by employee sales.
Still have any question, I think you got it
@AlanP514 @srlabhe123
I have done that but the column is grayed out when I am using it while doing conditional formatting.
My data source is azure analysis services. Is it the reason for grayed out?
Hi
Say for measure Q1 Sales
Create flag say VarFlag= if(Product ="Apple" && Q1Sales>= 1000 && Q1Sales<= 5000, 0,
if(Product ="Apple" && Q1Sales>= 5001 && Q1Sales<= 8000, 1,-1))
Then use Colorcoding like below, it shoudl work
thanks, @srlabhe123,
Looks like varflag is a calculated column. But in my case varflag is grayed out when I am trying to use this column for conditional formatting, any reason for this? or it is grayed out because of I have created this column in cube ( tabular model)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |