Forum Discussion
jibran
Helper II
9 years agoIf statement with count
Hi Dev, I am trying to write a DAX query that shows me value of 0. if sum of debit side of a vehicle equals to the credit side of that period. My formula is below but it comes with an error Equal ...
- 9 years ago
Hi jibran,
Please try to create a measure like below:
Equal = IF(CALCULATE(SUM(Table1[F_NOM_ CREDIT]), ALLEXCEPT(Table1,'Table1'[F_NOM_VEH_ID],'Table1'[F_NOM_PERIOD]))=CALCULATE(SUM(Table1[F_NOM_DEBIT]), ALLEXCEPT(Table1,'Table1'[F_NOM_VEH_ID],Table1[F_NOM_PERIOD])), 0,-1)
Best Regards,
Qiuyun Yu
v-qiuyu-msft
Community Support
9 years agoHi jibran,
Please try to create a measure like below:
Equal = IF(CALCULATE(SUM(Table1[F_NOM_ CREDIT]), ALLEXCEPT(Table1,'Table1'[F_NOM_VEH_ID],'Table1'[F_NOM_PERIOD]))=CALCULATE(SUM(Table1[F_NOM_DEBIT]), ALLEXCEPT(Table1,'Table1'[F_NOM_VEH_ID],Table1[F_NOM_PERIOD])), 0,-1)
Best Regards,
Qiuyun Yu
jibran
Helper II
9 years agoHi,
Thanks for the help I was away from the office it has worked, but can I use filter for example show me only -1 related data or show me 0 related data.
Many Thanks
Jibran