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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Sky1
New Member

Measure to show as new row on certain filter value

Hi,

 

I am still new to PowerBI. I use a lot of Excel daily to work. I need advice from you guys on whether this is possible or not.

 

So Signify Supplier needs to have 3% packaging fee, while the other supplier doesn't need it. I already created a measure to only calculate this function and it is working as expected. Would it be possible to calculate this 3% as an extra row, not as an extra column beside the Total Order Value column?

 

Screenshot 2024-04-05 084913.png

The goal:

 

Screenshot 2024-04-05 084151.png

 

When Signify is not selected as the supplier name, there won't be any packaging fee on the products, which the table below is already correct, however just like the request above, I'd like to not show the Signify Packaging Fee column if possible.

 

Screenshot 2024-04-05 085204.png

 

Many thanks. Hopefully it's not confusing.

13 REPLIES 13
Sky1
New Member

Signify Fee column is counted when the supplier = Signify and it's a 3.3% from the Order Value column.
I have made a measure to calculate this column:

Signify Packaging Fee = CALCULATE(sum(Orders[Total value])*0.033,KEEPFILTERS((Orders[Supplier]="Signify")))



Current result 

School NameSupplier NameProduct CodeQtyOrder ValueSignify Fee
ASignifyFT10011003.3
BSignifyLA1250016.5
CSignifyLA2360019.8
DSignifyLA3440013.2
Total  10160052.8

 

Expected result

 

School NameSupplier NameProduct CodeQtyOrder Value
ASignifyFT1001100
BSignifyLA12500
CSignifyLA23600
DSignifyLA34400
Signify Fee   52.8

 

 

lbendlin_0-1712533232814.png

Something's still off with the display but you see the general idea.

 

 

I tried to recreate the solution however it doesn't seem to work. I have matched the relationship between the tables as well. Not sure where this goes wrong?


Update: sorry wrong screenshot before

Sky1_1-1712536188637.png

 

 

 

You need to aggregate Supplier and Product

Aggregating those fields removed the other products and the calculation is still not calculating correctly.

 

Sky1_0-1712609128184.png

Previous visual before aggregate:

Sky1_1-1712609196870.png

 

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Put simply, the column you use in the visual for "School Name" needs to contain "Signify Packaging Fee". You could create a new table using DAX using UNION across the School Data table and a declared table that just contains the Signify row, or you could add a new row during data load in power query.  After lbendlin's reply to my previous comment, I'd prefer the DAX approach.  After the table is created you could add a new column that is equal to the school name when not Signify, and "Zzzz" when it is, and then sort School Name by that column.

 

When the new School Name column is used in the visual, the row context of [School Name] = "Signify Packaging Fee" is available for the measure to run correctly.

 

Hi Ghaines, appreciate your answer however I am still quite new to PowerBI and not sure how to implement the guide you provided above. I'll try the Power Query solution and see if that works

So you'd also need to built out the Schools table to include Signify Fee, probably during power query?  Also best to sort the schools by school ID if there is such a thing with Signify Fee being arbitrarily high to place it at the bottom, or add an index during load and use that to sort columns.

You can do it in Power Query or via a calculated table (UNION() ).  fair point on the sorting.

lbendlin
Super User
Super User

You can show/hide that row as part of the standard rows. You can't add it as a second total.

Thank you for your reply. How do you show / hide it as part of the standard rows?

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.