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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

How to write DAX statement using where condition

Here is the visual of power BI report shown below for summary table.

The Actual, budget values are summing up for Sales, Cost of Sales, Gross Profit in % of Sales. 

But I am looking for an average of values for Report Parameter "Gross Profit in % of Sales". 

How to write the DAX formula for a new measured Value (which summarizes Sales, Cost of Sales, and averages Gross profit in % of Sales) 

PS: The Report parameter is varchar type, Sales are in decimal type.

 

Capture.PNG

 

 

Any help will be appreciated, thank you 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Looks like your column in Level 2 has 3 values, and you are using just 1 measure.

 

You cannot change the measure properties of 1 of the row values. (To show 2  rows as sum and one row as percentage)

 

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Assume your dataset is like this

3.png

Then create a new measure to calculate an average of values for Report Parameter "Gross Profit in % of Sales".

Measure 2 = IF(MAX([cater])="Gross profit in % of sales",AVERAGEX(ALL(Sheet1),[Measure]),[Measure])

4.png

 

Best Regards

Maggie

Anonymous
Not applicable

Have you tried "Percentage of Grandtotal" ?

percental grandtotal.png

Anonymous
Not applicable

@Anonymous, Yes when I try using show value as percentage of grand total, the other parameters (Sales, Cost of Sales) are changing as well. 

 

Capture.PNG

 

 

Anonymous
Not applicable

Looks like your column in Level 2 has 3 values, and you are using just 1 measure.

 

You cannot change the measure properties of 1 of the row values. (To show 2  rows as sum and one row as percentage)

 

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.