Labels

CSOM (1) JavaScript (1) SharePoint (1)

Wednesday, December 13, 2017

Simple DAX on Power BI

DAX

Sum with applying a filter

Total for Non Duplicate = 
CALCULATE(
SUM('InvoiceDetails'[Total]),
'InvoiceDetails'[DuplicateInvoice] IN { FALSE }
)

Total for Non Duplicate 2 =
 SUMX( 
FILTER(InvoiceDetails,InvoiceDetails[DuplicateInvoice] = FALSE ),

InvoiceDetails[Total])


Handle null value in SUM/ COUNT


Exception Value = 
VAR total=SUM(InvoiceStatusView[EXCEPTION]) 

RETURN IF(ISBLANK(total),0,total)


Exception Count = 

VAR total=COUNT(InvoiceStatusView[EXCEPTION]) 

RETURN IF(ISBLANK(total),0,total)

No comments:

Post a Comment