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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

value < 24 , not returning 0 values in DAX.

I have a DAX code where I am doing:

 

var Final1 = 
FILTER(
            SUMMARIZE(NextWeekCS,'Staffing'[DW_EK_Employee],'Date'[Week Year Week Number],"summ", SUM(Staffing[Hours])
            ),                       
                         [summ]<24
                         )

Var final = SUMMARIZE(final1, 'Staffing'[DW_EK_Employee])

 

But there is cases where the summ is 0, and my query is not retrieving those results:

I tend to think in a sql-way... is it correct to apply either?

  • [summ]<24 || [summ]=0
  • [summ]<24 || [summ] = BLANK()
  • [summ]<24 || [summ] is BLANK

Or shall I create a new/different summarize?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

What do you expect the output to be? The final output of the Dax you have written is a table.

Table = 
SUMMARIZE (
    FILTER (
        SUMMARIZE (
            Staffing,
            'Staffing'[DW_EK_Employee],
            "summ", SUM ( Staffing[Hours] )
        ),
        [summ] < 24
    ),
    [summ]
)

vzhangti_0-1644830443407.png

Can you provide some data for testing? What do you expect the final result to look like and can you show it in a screenshot.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

What do you expect the output to be? The final output of the Dax you have written is a table.

Table = 
SUMMARIZE (
    FILTER (
        SUMMARIZE (
            Staffing,
            'Staffing'[DW_EK_Employee],
            "summ", SUM ( Staffing[Hours] )
        ),
        [summ] < 24
    ),
    [summ]
)

vzhangti_0-1644830443407.png

Can you provide some data for testing? What do you expect the final result to look like and can you show it in a screenshot.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ValtteriN
Super User
Super User

Hi,

It is somewhat hard to judge this since I am not sure how much data you are dealing with, but I would go with the second option. Additionally depending on your end goal, I would use functions like SUMX in the second variable/ end result. e.g. if you want to have hours in a filter context SUMX(final1,[summ]) should be useful. Finally, these sort of iterative SUMMARIZE structures are rarely optimal and depending on your end goal it might be good to rethink your apporach.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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