Skip to main content

Power BI

New

Bulk Measures

Vote (1) Share
David Swinton's profile image

David Swinton on 24 Jun 2024 23:20:35

I create semantic models that are measure heavy. Often the next measure is simply a copy paste of the previous measure with for example a location change. As an example

Metal from Stack 10 (t) = [TSL Slag from Stack 10]*[Total Metal in Stack 10 Assay (%)]

Metal from Stack 11 (t) = [TSL Slag from Stack 11]*[Total Metal in Stack 11 Assay (%)]

Metal from Stack 12 (t) = [TSL Slag from Stack 12]*[Total Metal in Stack 12 Assay (%)]


or


Total TSL Slag from Stack 09 to BB = calculate(sum(All_Daily_Stocks[Value]),All_Daily_Stocks[Material Name]="Slag Blocks",All_Daily_Stocks[Origin]="Slag Stack 09",All_Daily_Stocks[Destination]in{"Battery Bay", "Wharf Bunkers"},SLICER_Date[Date]<=max(SLICER_Date[Date]))

Total TSL Slag from Stack 10 to BB = calculate(sum(All_Daily_Stocks[Value]),All_Daily_Stocks[Material Name]="Slag Blocks",All_Daily_Stocks[Origin]="Slag Stack 10",All_Daily_Stocks[Destination]in{"Battery Bay", "Wharf Bunkers"},SLICER_Date[Date]<=max(SLICER_Date[Date]))

Total TSL Slag from Stack 11 to BB = calculate(sum(All_Daily_Stocks[Value]),All_Daily_Stocks[Material Name]="Slag Blocks",All_Daily_Stocks[Origin]="Slag Stack 11",All_Daily_Stocks[Destination]in{"Battery Bay", "Wharf Bunkers"},SLICER_Date[Date]<=max(SLICER_Date[Date]))


A means in power bi to create measures in bulk (maybe in a similar fashion to a calculated table) would be a great time saver.