Forum Discussion

ViktorJ's avatar
ViktorJ
Frequent Visitor
3 years ago

Subtotal and total not showing

Hi all,

 

I get values in the rows, but no values in the subtotal or total. I need the subtotals and total to be the average of the values.

 

I have the following DAX:

 

Volume compliance (on archetype level) =
VAR NoOfMetrics = 2
VAR VolumeCon =
    AVERAGEX('SiteSnaphot Volume', ([CBM - Inbound (%)] + [CBM - outbound (%)]) / NoOfMetrics)
VAR VolumeDecon =
    AVERAGEX('SiteSnaphot Volume', ([Cartons - Inbound (%)] + [Cartons - outbound (%)]) / NoOfMetrics)
VAR VolumeFul =
    AVERAGEX('SiteSnaphot Volume', ([Units - Inbound (%)] + [Units - outbound (%)]) / NoOfMetrics)
RETURN
    SWITCH(SELECTEDVALUE('SiteSnaphot Volume'[ArcheType]),
        "Consolidation", VolumeCon,
        "Deconsolidation", VolumeDecon,
        "Fulfilment", VolumeFul)
 
Furthermore, if you have a solution on how I can make the VolumeCon etc. more dynamic that dividing with 2.
 
This is a snip of the subtotal (upper white cell with no value) and row value (blue cell with 100%).
 

 

 

Furthermore, the [CBM - Inbound (%)] etc. are measures that I have created.

 

Hope you can help me.

 

Viktor

1 Reply