Forum Discussion
Anonymous
10 years agoNot applicable
DAX filtering help
I have some simple data with slicers on CUSTOMER, YEAR, and MONTH that just shows a summary table of their monthly charges. The wrinkle is that for a service there may be a negotiated monthly charge ...
v-sihou-msft
Microsoft Employee
10 years agoAnonymous
In your scenario, this negotiated monthly charge is based on number of rows for Month 0, or the charge value for Month 0?
For first scenario, you measure can be like:
Mesure= IF(
CALCULATE(COUNTROWS('Table'),'Table'[Month]='0')>0,
CALCULATE(SUM('Table'[Charge]),'Table'[Month]='0'),
CALCULATE(SUM('Table'[Charge]))
)
For sceond scenario, your measure can be like:
Mesure= IF(
CALCULATE(SUM('Table'[Charge]),'Table'[Month]='0')>0,
CALCULATE(SUM('Table'[Charge]),'Table'[Month]='0'),
CALCULATE(SUM('Table'[Charge])))
Regards,