Forum Discussion
Joining multiple formulas into one
Hi, you can use variables inside the measure.
My TestValidation 2% =
VAR Quality_10_Score_Count =
CALCULATE ( COUNT ( Sheet1[Quality] ); Sheet1[Quality] = 10 )
VAR Quality_Score_10_and_Recommended_Score_9_or_10 =
CALCULATE (
COUNT ( Sheet1[Quality] );
Sheet1[Quality] = 10;
Sheet1[Recommended] = 10
|| Sheet1[Recommended] = 9
)
VAR Quality_Score_10_and_Recommended_Score_9_10_V2 =
CALCULATE (
COUNT ( Sheet1[Quality] );
Sheet1[Quality] = 10;
Sheet1[Recommended] <= 6
)
VAR Test_Validation_2_Recommended_Score = Quality_Score_10_and_Recommended_Score_9_or_10
- Quality_Score_10_and_Recommended_Score_9_10_V2
RETURN
Test_Validation_2_Recommended_Score / Quality_10_Score_CountRegards
Victor
Lima - Peru
The only thing is I only want to use columns Recommended and Quality inside the calculation. Can you show me how I would do that not using all those pre-created measures. I only want to use the 2 values that are actually inside my dataset. The image below shows the only 2 true data points in the file. Is there a way to get it combined using only those fields?
- stretcharm8 years agoMemorable Member
Variables are an efficient way of getting what you need.
- nmck868 years agoPost Patron
I believe it may be but I believe my problem is slightly more complex than that.. so the one % is only one of many. Let me pose another question in a new dicussion. I appreciate your help and the var worked. However, I really want those results set at a different level. I have attached a cloud based PBIX file for your review. In the screenshot below I have created a metric score 1; however, I need that calculation for about 13 other metrics. Is there an easy way to do this? So I would want to use the score guide table to build a relationship between the metrics 1-13 and then I want the scores to show up across the entire data set. So essentially I want Metric 1 Scores, Metric 2 Scores, Metric 3 scores, etc.. and then the 0-10 scoring graph on there one single time for all the scores as they have the same calculations just under different metrics. Any insight would be amazing. I have created dummy data to get assistacne with the report.
https://drive.google.com/open?id=1mSopjlD9DtDh_sscTAHXXIDkEj5bpxvE