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
SLJN
Regular Visitor

Scalable measures and filters within measures

Hi

 

I need help with creating scalable measures. The desired end result is to display a business unit with its  total weight of selected products, and the selected products separately. In example, I want to display the total weight of the products in business unit 1 in total and then when you select business unit 1 i want to show product 1 and 2 seperately.

 

I have 9 business units that all have several different products. However, its only the selected products that I'm interested in.   

 

The star schema looks as following. 

 

SLJN_0-1669210881492.png

 

I have done a measure to summarize the total weight called weight (T). And then a measure for each BU like this 

 

Actual weight (NO) = 

CALCULATE ( 

[weight], 

BUSINESSUNIT [BUID] = "NO",

PRODUCT[PRODUCT] in ("CORV","RENA")
)

 

It returns the right sum. But how do I show the result for NO that shows the total weight of CORV and RENA separately?  If I put the measure in a table and then add product it displays all products, not the selected ones.  Also how do I make this scalable? without having to go into each measure ans change the product.

 

In a table preferable 

BU  PRODUCTS WEIGHT

NO                    131

        CORV          72

        RENA          59

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SLJN , Try like

 

Actual weight (NO) = 

CALCULATE ( 

[weight], 

filter( BUSINESSUNIT, BUSINESSUNIT [BUID] = "NO"),

filter(PRODUCT, PRODUCT[PRODUCT] in ("CORV","RENA"))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
SLJN
Regular Visitor

It works! Thank you! 

Do you know how to call on specific values in a Column? 

Such as a the products for NO. 

I want to build something more scalable. So when the products are changing I only change it in one place. 

 

amitchandak
Super User
Super User

@SLJN , Try like

 

Actual weight (NO) = 

CALCULATE ( 

[weight], 

filter( BUSINESSUNIT, BUSINESSUNIT [BUID] = "NO"),

filter(PRODUCT, PRODUCT[PRODUCT] in ("CORV","RENA"))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I want to call the certain products for the business units in different measures. 

for differentiera time measures etc. Should I do the products as parameters that I call on? Or just variables? And how? 

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.