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
Thank you againg for your help :)
However, I haven't been able yet to success on my attempt.
These have been my steps and my result (on the picture below):
1) Click New Table
2) Writting :
Table 4 = 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")
3) I got the syntax error
Reading the previous messages I believe that my problem is that I do not know how to create the 3 column header name (table 3) (see, the squared area on the following pict).
Thank you so much!
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 know
Best Regards,
Angelia
- albertgarri9 years agoFrequent Visitor
Thank you very much!
I've been able to make it work! Really appreciatte all your help! :) - ivancespedesl7 years agoHelper I
Does this work only for one table at a time? I tried plugging different variables from different tables and it stopped working.