Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nmck86
Post Patron
Post Patron

Question about joining multiple formulas

Hi All,

 

I want to combine multiple formulas into one formula and need assistance. I am going to put each formula below and the end result I am trying to get to is the 71.72%. However, I do not want to join all of those to create the formula, I want a combined formula only looking at the recommended column and the quality column to get me to the result set.

 

Quality 10 Score Count = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality] =10)

 

[Quality Score 10 and Recommended Score 9 or 10 ] = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]=10||Sheet1[Recommended] =9)

 

Quality Score 10 and Recommended Score 9.10 V2 = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]<=6)

 

Test Validation 2 Recommended Score = [Quality Score 10 and Recommended Score 9 or 10 ]-[Quality Score 10 and Recommended Score 9.10 V2]

 

Test Validation 2 % = [Test Validation 2 Recommended Score]/[Quality 10 Score Count]Results SetResults Set

 

 

 

 

 

 

7 REPLIES 7
Anonymous
Not applicable

I think the best way is use "var" on powerbi formula, like this:

Test Validation 2 % = 
// Quality 10 Score Count
	var quality10 = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality] =10) 
// Quality Score 10 and Recommended Score 9 or 10
	var QualityRecomV1 = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]=10||Sheet1[Recommended] =9) 
// Quality Score 10 and Recommended Score 9.10 V2
	var QualityRecomV2 = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]<=6)
// Test Validation 2 Recommended Score
	var Validation = QualityRecomV1-QualityRecomV2
// Test Validation 2 % 
	var Percentual = Validation/quality10

return 
	Percentual



Is there a way for me to share the entire dataset with you? The formula you provided brings back null results. I only want to use the recommended column and the sheet column. Not any of the ones that I built individually. I just want a consolidated formula that takes all those factors into account.

Hi @nmck86,

 

You can upload the file to a cloud drive like OneDrive, GoogleDrive, and then paste the download link here. Please mask your private data first.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @nmck86,

 

@Anonymous's solution works. How did you use the new measure? It should be used as a single value without specific context.

Question_about_joining_multiple_formulas

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Now, I am having trouble getting that calculation to be replicated across multiple columns in a data set.

 

I was curious if you had thoughts on how I can accomplish getting my metric score % to go across all 14 metrics I have in the below file. If I look at one metric alone it shows me the correct percentages. However, when I start adding metrics 2-13 to the same chart it doesnt give me the correct results. I think I have a filtering issue. Any thoughts? The first visual you see below is one with 2 seperate tables; however, I want to be able to join all the tables at the end and show a metric score 0-10 and all the corresponding %'s across all the metric types. I have a google file attached as well for additional insight. In the end I want a heat map that I can visualize the elasticy of each metric. 

https://drive.google.com/open?id=1mSopjlD9DtDh_sscTAHXXIDkEj5bpxvE

 

2018-03-05_17-15-51.png2018-03-05_17-09-02.png

I am trying to get a single calculated column created to build out a % calculation that I want to use. I have created the % but it was through building 4 different formulas seperately, mostly for my own sanity; however, now I need to combine all of those formulas into one. I have the pbix file and I am happy to share that file if you would like. Just let me know and I can email it. It is very small. Below are all the formulas that I created individually based on 2 fields in the data set. I want the consolidated formula to be all of those in one but not by using those calculated measures but just using the 2 COLUMNs in the data set. 

 

Quality 10 Score Count = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality] =10)

 

[Quality Score 10 and Recommended Score 9 or 10 ] = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]=10||Sheet1[Recommended] =9)

 

Quality Score 10 and Recommended Score 9.10 V2 = CALCULATE(COUNT(Sheet1[Quality]),Sheet1[Quality]=10,Sheet1[Recommended]<=6)

 

Test Validation 2 Recommended Score = [Quality Score 10 and Recommended Score 9 or 10 ]-[Quality Score 10 and Recommended Score 9.10 V2]

 

Test Validation 2 % = [Test Validation 2 Recommended Score]/[Quality 10 Score Count]

Results of each formula broken down to get the final % to the rightResults of each formula broken down to get the final % to the right

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.