Forum Discussion
Junaid11
4 years agoHelper V
Dax function recreate
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 ...
Pragati11
4 years agoSuper 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
- v-chenwuz-msft4 years agoCommunity Support
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.