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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Junaid11
Helper V
Helper V

Dax function recreate

Hello,

I had this data below:

DateSalesOrderRevenueDepartment
11/02/2020A125210P
11/02/2020A256732L
11/02/2020A345627L
12/02/2020A125210P
12/02/2020A271354L
12/02/2020A343362P
12/02/2020A423565P
12/02/2020A45743P

I used below formula to calculate the measure showing New sales order:

Measure =
IF (
    CALCULATE (
        DISTINCTCOUNT ( 'Table 1'[Date] ),
        ALLEXCEPT ( 'Table 1', 'Table 1'[SalesOrder] )
    ) = 1,
    SUM ( 'Table 1'[Revenue] )
)

It was generating below result which was perfect for me:

sdfghtty.PNG

it was working fine until I put Department column in the row. The Dax value did not show any value. It was showing it blank but whenever I clicked the department the sales order value was showing result.

It is showing it like below:

asddasfff.PNGasdasffffff.PNG

but I want department to show full value as well like P has new value in sales order A4 so Department value should show the sum of ne values of any new sales order it has in it.

Is it possible to achieve it?

It was solved previously by @smpa01 

3 REPLIES 3
Pragati11
Super User
Super User

Hi @Junaid11 ,

 

Try modifying the DAX as follows:

Measure =
IF (
    CALCULATE (
        DISTINCTCOUNT ( 'Table 1'[Date] ),
        ALLEXCEPT ( 'Table 1', 'Table 1'[SalesOrder], 'Table 1'[Department] )
    ) = 1,
    SUM ( 'Table 1'[Revenue] )
)

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hello @Pragati11 ,

I have already done that but it is still not working.

asddfeeeff.PNG

Hi @Junaid11 ,

 

From your description, you should want to use a gong'neng similar to this function:

HASONEVALUE(<columnName>)

Try this code:

Measure = 
IF(
    HASONEVALUE( 'Table'[Department] ),
    SUM( 'Table'[Revenue] ),
    BLANK()
)

result:

vchenwuzmsft_0-1642147560623.png

 

Best Regards

Community Support Team _ chenwu zhu

 

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

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.