Forum Discussion
Changing column graph displayed value
- 9 years ago
Hi albertgarri,
I am sorry for inconvenience, I misunderstand your idea in above reply. The solution above is to create a new table using formula. While in this solution, please click the Enter Date, you will get the create table window, please type the values, you can rename the table name in highlighted background section. Click OK you get Table4.
In the DAX formula, "Expected Value" is the measure name. Please right click your table->New measure, type the following statement is over-all.Expected Value = IF(HASONEVALUE( Table3[Value]), SWITCH(VALUES( Table3[Value]), "Amount", SUM( Table4[Amount] ), "Amount spent", SUM( Table4[Amount spend] ), "Price per unit", SUM( Table4[Price per Unit] ) ), "Please select only one value to display")
In your scenario, please replace Table3 name using your actual table name. Table4 is the new table name. Please replace it using your table name.
If you have any other issue, please let me knowBest Regards,
Angelia
Cool .
1. Create one Table with that three columns like
1. Amount
2. Unit price like ect.
2. Have to create one measure based on that selection on filter , pls look that image
let me know if it is not helping u dude.
Hi albertgarri,
Just as the BetterCallFrank posted, his point is right. But miss a comma in his measure. I try to reproduce and get expected result.
Create a new table including the three column header name. I name it Table3 shown in screenshot below.
Expected Value =
IF(HASONEVALUE( Table3[Value]),
SWITCH(VALUES( Table3[Value]),
"Amount", SUM( Table4[Amount] ),
"Amount spent", SUM( Table4[Amount spend] ),
"Price per unit", SUM( Table4[Price per Unit] )
), "Please select only one value to display")
Then create clustered column chart, select the Food field as Axis, select the "Expected Value" as value level, you will get the right result. Please see the fisrt picture, when you select "Amount", it will display all the value of different food. While when clicks the "Price per unit" box , the graph will show "Price per unit" per "Food" data shown in the second picture.
If you have any other problem, please feel free to ask.
Best Regards,
Angelia