Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi All,
I hope you ncan help me out....I have fact table with the following information and columns.
| measure = sum of load | loadgroup_code | unloadgroup_code | type of shipment |
| ... | blank / empty | blank / empty | blank / empty |
| ... | 1 | 1 | 1 |
| ... | 2 | 2 | 2 |
| ... | 3 | 3 | 3 |
| ... | 4 | 4 | 4 |
| ... | 1 | blank / empty | 8 |
I want to create 3 measures Sum of load for:
I started like DAX formula below but is not giving me the correct filter... and cannot find solution in community.
P = CALCULATE([sum of load],
Solved! Go to Solution.
Hi @Dave1972 ,
In DAX, you could use <> to replace "is not" , && to replace "and" , || to replace "or",
So please try the following formula:
P =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "2"
&& ( 'Table'[unloadgroup_code] <> "2"
|| 'Table'[unloadgroup_code] <> "blank / empty" )
&& ( 'Table'[type of shipment] <> "2"
|| 'Table'[type of shipment] <> "blank / empty" )
)
)
E =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "3"
&& 'Table'[type of shipment] <> "blank / empty"
)
)
Z =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "1"
&& ( 'Table'[unloadgroup_code] <> "1"
|| 'Table'[unloadgroup_code] <> "blank / empty" )
&& 'Table'[type of shipment] <> "blank / empty"
)
)
P+E+Z = [P]+[E]+[Z]
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dave1972 ,
It depends on the data type of columns. I have built a data sample for you to easily understand the difference in DAX.
1.If data type of these columns are Text, use "" to replace "blank /empty"
Data type is Text = CALCULATE(SUM(Test[Load]),FILTER('Test','Test'[Text]<>""))
2. If data type of these columns are Number, use BLANK() to replace "blank /empty"
Data type is Number = CALCULATE(SUM('Test'[Load]),FILTER('Test','Test'[Number]<>BLANK()))
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dave1972 ,
It depends on the data type of columns. I have built a data sample for you to easily understand the difference in DAX.
1.If data type of these columns are Text, use "" to replace "blank /empty"
Data type is Text = CALCULATE(SUM(Test[Load]),FILTER('Test','Test'[Text]<>""))
2. If data type of these columns are Number, use BLANK() to replace "blank /empty"
Data type is Number = CALCULATE(SUM('Test'[Load]),FILTER('Test','Test'[Number]<>BLANK()))
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Eyelyn9,
Thanks so much. It works now fine, however how do I handle instead of text "blank /empty" the fact that this cell is just empty....
Best regards, Dave
Hi @Dave1972 ,
In DAX, you could use <> to replace "is not" , && to replace "and" , || to replace "or",
So please try the following formula:
P =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "2"
&& ( 'Table'[unloadgroup_code] <> "2"
|| 'Table'[unloadgroup_code] <> "blank / empty" )
&& ( 'Table'[type of shipment] <> "2"
|| 'Table'[type of shipment] <> "blank / empty" )
)
)
E =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "3"
&& 'Table'[type of shipment] <> "blank / empty"
)
)
Z =
CALCULATE (
[Sum of Load],
FILTER (
'Table',
'Table'[loadgroup_code] = "1"
&& ( 'Table'[unloadgroup_code] <> "1"
|| 'Table'[unloadgroup_code] <> "blank / empty" )
&& 'Table'[type of shipment] <> "blank / empty"
)
)
P+E+Z = [P]+[E]+[Z]
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |