Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I need help i wrote DAX measure for clustered column chat to return green when the target is achieved and red when is not i have two columns Target and Measure my DAX formual is (color=if([target]>[Actual], "red", "green") )i get an error "The value for 'target' cannot be determined. Either the column doesn't exist, or there is no current row for this column" i dont know how to resolve this.
Solved! Go to Solution.
Hi @Clament ,
As the one what I said in my previous post, we can't make conditional formatting for the column chart. We can refer the method in the following blog to get the same requirement.
How to do conditional formatting in Power BI Column Charts
I updated your sample pbix file(see the attachment), please check if that is what you want.
1. Create two measures as below to get the sum of actual with different conditions
Above Actual =
IF (
SUM ( 'Sheet1'[target] ) <= SUM ( 'Sheet1'[actual] ),
SUM ( 'Sheet1'[actual] )
)
Below Actual =
IF (
SUM ( 'Sheet1'[target] ) > SUM ( 'Sheet1'[actual] ),
SUM ( 'Sheet1'[actual] )
)
2. Put the above measures onto the visual to replace the field [actual] with the aggregation "Sum" and set the different color for them
Best Regards
i wrote the measure but the bars are not Changing colors below is the screenshot.
Hi @Clament ,
How did you apply and set the measure [color] on the visual? What's your final expected result? The conditional formatting is currently suitable for table or matrix visualization.
Apply conditional formatting in tables and matrixes
Could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution or an workaround. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
i used clustered column chart. i want the bars for actual to return only red and green based on the value of the target for example if the target is 50% and actual is 60% i want the bar for actual to be green. i wrote my measure then open the virtual and check the measure on the fields nevigation side.
Hi @Clament ,
Base on my research, there is no option or settings can make conditional formatting on the bar of column chart. Could you please share a simplified pbix file with fake data? You can refer the following link to upload the file to the community. Later I can check if there is any workaround can achieve the similar requirement. Thank you.
How to upload PBI in Community
Best Regards
here is the link to fake PBI file hope it will assist
Hi @Clament ,
As the one what I said in my previous post, we can't make conditional formatting for the column chart. We can refer the method in the following blog to get the same requirement.
How to do conditional formatting in Power BI Column Charts
I updated your sample pbix file(see the attachment), please check if that is what you want.
1. Create two measures as below to get the sum of actual with different conditions
Above Actual =
IF (
SUM ( 'Sheet1'[target] ) <= SUM ( 'Sheet1'[actual] ),
SUM ( 'Sheet1'[actual] )
)
Below Actual =
IF (
SUM ( 'Sheet1'[target] ) > SUM ( 'Sheet1'[actual] ),
SUM ( 'Sheet1'[actual] )
)
2. Put the above measures onto the visual to replace the field [actual] with the aggregation "Sum" and set the different color for them
Best Regards
Hi @Clament ,
According to your description, it seems that you are creating a measure. Please update the formula of measure as below using the aggregation function, later check if it can return your expected result.
color = IF ( SUM ( [target] ) > SUM ( [Actual] ), "red", "green" )
In addition, you can review the following blog for more details about DAX errors....
If the above one can't help you, could you please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
User | Count |
---|---|
88 | |
72 | |
69 | |
65 | |
57 |
User | Count |
---|---|
93 | |
93 | |
91 | |
76 | |
69 |