Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX for Filtering in an existing Measure

Hello All

 

I have the following Measure which I use in my dashboard:

 

Total Cost = SUM(VirtualMachine[MemoryCharge])+SUM(VirtualMachine[vCPUCharge])+SUM('VmDrive'[StorageCharge])+SUM('VirtualMachine'[VmCharges])
 
I need to make one adjustment. I have another field called VMName, I need the above measure to Sum where "VMName is not blank." How would I modify the above measure to include this filtered adjustment?
  • [Total Cost (no blank)] =
    CALCULATE(
        [Total Cost],
        KEEPFILTERS( NOT ISBLANK( VirtualMachine[VMName] ) )
    )

1 Reply

  • [Total Cost (no blank)] =
    CALCULATE(
        [Total Cost],
        KEEPFILTERS( NOT ISBLANK( VirtualMachine[VMName] ) )
    )