Forum Discussion
cannot visualize previous month values in graph
- 8 years ago
Thanks, that was the solution I was looking for.
Unfortenately the conditional formating of power bi don't allow if statemens so I used formula below to change the words.
Label = if ('TableName'[Perc. Diff] >= 0.2 || 'TableName'[Perc. Diff] <= -0.20, "divergend", "standard" )
- 8 years agoIn conditional format you need to select the use formula in the setup it will allow you to make several ifs.
Hi MFelix,
Did you made chart in the example file?
When possible I like to create a clustered bar graph with on the x-axis the categories and on the y-axis the #. As values I want to use actual month and previous month.
Next I am placing date, catgory, actual and previous value, difference in a table. I want to use conditional formating to make the background color red when the differece exceeds a certain value.
Hi Tairo,
The measures are based on context so when you make a chart with categories on axis and values vs preivous month you need to have the month as a context. Do the following to achieve the necessary setup:
- Place Month / Category on Axis
- Place Values / PM in Values
- Drilldown to lowest category and you will have the chart as below:
then just make the table as you need: with the following measure added:
Difference = SUM(TableName[Values]) - [PreviousMonthValues]
Regards,
MFelix
- Tairo8 years agoHelper I
Thanks, that was the solution I was looking for.
Unfortenately the conditional formating of power bi don't allow if statemens so I used formula below to change the words.
Label = if ('TableName'[Perc. Diff] >= 0.2 || 'TableName'[Perc. Diff] <= -0.20, "divergend", "standard" )
- MFelix8 years agoSuper UserIn conditional format you need to select the use formula in the setup it will allow you to make several ifs.