Forum Discussion
BI_Vijay
1 year agoRegular Visitor
Need help with a DAX formula
I have 2 measures one is Transactions - which is nothing but the Sum(Transactions) from my Fact 'Debit Transaction' and the other one is 'Sector Transactions' - which actually should show the valu...
_AAndrade
Resident Rockstar
1 year agoHi BI_Vijay,
Please try this formula:
Sector Transactions =
VAR SelectedSector = SELECTEDVALUE(Customer[Sector Name])
VAR Output1 =
IF(
ISBLANK(SelectedSector),
BLANK(),
CALCULATE(
SUM('Debit Transaction'[Transactions]),
REMOVEFILTERS(Customer[Main Sector Name])
)
)
RETURN Output1
- BI_Vijay1 year agoRegular Visitor
Thanks _AAndrade . I tried that, and it removed the filter on the Main Sector which is equivalent to the other measure "Transactions".
This is how the output looks like
- _AAndrade1 year ago
Resident Rockstar
Could you please share a pbix file with an example of your data and data model?
- BI_Vijay1 year agoRegular Visitor
Hey _AAndrade , sorry i had other measures too in the visual which actually made the visuals to go wrong. I tried the same DAX from you again and i see the results are closer to what i want.
and unfortunately, the PBIX has lot of PROD Tables - actually, 15 more which i haven't mentioned here - but they are perfectly connected.
So, i'm trying to replicate the outputs in excel and posting it here.
Thank you!