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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to Calculate Total after using Parameters

Hi all,

 

I got below report and cannot calculate a correct grand total.

Some logic for calculation

- Density is anumeric parameter

- Each Warehouse has own Density Value

- CuFt =  SqFt * Density

 

I am using below DAX for calculating CuFt for each warehouse, but I cannot get the correct total (just place an text for remind).

Can anyone help and any other solution?

 

DAX Code

Capacity (CuFt) =
VAR GSW=if(SELECTEDVALUE(Warehouse[Warehouse])="GSW",'WH Capacity Measurement'[WH CuFt Capacity]*'Density - GSW'[Density - GSW Value],0)
VAR Oneill=if(SELECTEDVALUE(Warehouse[Warehouse])="Oneill GA",'WH Capacity Measurement'[WH CuFt Capacity]*'Density - ONLGA2'[Density - ONLGA2 Value],0)
VAR EOSCA=if(SELECTEDVALUE(Warehouse[Warehouse])="EOSCA",'WH Capacity Measurement'[WH CuFt Capacity]*'Density - EOSCA'[Density - EOSCA Value],0)
VAR EOSTX=if(SELECTEDVALUE(Warehouse[Warehouse])="EOSTX",'WH Capacity Measurement'[WH CuFt Capacity]*'Density - EOSTX'[Density - EOSTX Value],0)
VAR Irvine=if(SELECTEDVALUE(Warehouse[Warehouse])="Irvine",'WH Capacity Measurement'[WH CuFt Capacity]*'Density - Irvine'[Density - Irvine Value],0)

Return


if(SELECTEDVALUE(Warehouse[Warehouse])="GSW",GSW,
if(SELECTEDVALUE(Warehouse[Warehouse])="Oneill GA",Oneill,
if(SELECTEDVALUE(Warehouse[Warehouse])="EOSCA",EOSCA,
if(SELECTEDVALUE(Warehouse[Warehouse])="EOSTX",EOSTX,
if(SELECTEDVALUE(Warehouse[Warehouse])="Irvine",Irvine,
"Depend Density")))))

chiu2003_0-1687259337533.png

 

3 REPLIES 3
devanshi
Helper V
Helper V

Capacity (CuFt) =
VAR
  capacity if(SELECTEDVALUE(Warehouse[Warehouse]),'WH Capacity Measurement'[WH CuFt Capacity]*'Density - Irvine'[Density - Irvine Value]0)
Return
if(SELECTEDVALUE(Warehouse[Warehouse]),(Warehouse[Warehouse]),
"Depend Density")
Anonymous
Not applicable

Hi, thanks for your help.

 

But I would like to return 1,179,800 (570,000+ 380,800+102,000+102,000+25,000) instead of Depend Density for Table total 

You can sum the value of that column instead of depend density.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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