Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello,
I had this data below:
| Date | SalesOrder | Revenue | Department |
| 11/02/2020 | A1 | 25210 | P |
| 11/02/2020 | A2 | 56732 | L |
| 11/02/2020 | A3 | 45627 | L |
| 12/02/2020 | A1 | 25210 | P |
| 12/02/2020 | A2 | 71354 | L |
| 12/02/2020 | A3 | 43362 | P |
| 12/02/2020 | A4 | 23565 | P |
| 12/02/2020 | A4 | 5743 | P |
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:
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:
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
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
Hi @Junaid11 ,
From your description, you should want to use a gong'neng similar to this function:
Try this code:
Measure =
IF(
HASONEVALUE( 'Table'[Department] ),
SUM( 'Table'[Revenue] ),
BLANK()
)
result:
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.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 50 | |
| 37 | |
| 29 | |
| 24 |