Forum Discussion
Graph range conditional formatting not working with a measure
- 1 year ago
Thanks, I seem to have resolved it. I rebuilt the graph and now it's working correctly when I filter on the area so not sure what was different the first time around. I didn't need to change the measure. Note I did do a quick check as you have above with a table the same as my graph dimensions and I get a different value for each year & month as you have in your table but when I use it in the axis it takes the value that shows when I put the measure in the card, i.e the value of the total line in the table
Hi GS76 ,
You problem is that the result for the maximum and minimum have more that one value per month so when you get to the overall y-axis it returns more than one value so it does not work.
For this you need to pickup the MAX and MIN for all selected months try to add the following code:
Minimum = MINX(ALLSELECTED(TABLE[Month]), [Min Line for Axis])
Maximum = MAXX(ALLSELECTED(TABLE[Month]), [Max Line for Axis])
Be aware that the Table[Month] is the values you are using has X-axis on your chart, this should give you the expected result.
- GS761 year agoFrequent Visitor
I'm not quite sure how I'm writing that. I've created the table MinLine with the measure Total Sales Per Volume and then I'm taking the Minx value of the measure in that table i.e.
Minx(MinLine,Total Sales Per Volume) where am I adding in the date part if I do:
Minx(allselected('Sales'[Date],MinLine,Total Sales Per Volume) I get an error.
A single value for date in table 'Sales cannot be determined.
Also in this part I'm getting the measure for each of the 12 months at month level:
SUMMARIZECOLUMNS(
'Sales'[Year & Month],
DATESBETWEEN('Sales'[Date],_min,_max),
"Total Sales Per Volume", DIVIDE(SUM('Sales'[Sales]),SUM('Sales'[Volume]))And then when I do minx of this table does this not give me one number? Note this works fine in the axis when I don't select an area from the table. It's only when I select the area that the number isn't calculated correctly
- MFelix1 year agoSuper User
Hi GS76 ,
This is context related, can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.- GS761 year agoFrequent Visitor
I'm not allowed to share the PBIX file it's against our companies confidentiality rules. I will try and spend some time next week mocking up some example data to share.