Forum Discussion
Need help with a DAX formula
Could you please share a pbix file with an example of your data and data model?
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!
- Anonymous1 year agoNot applicable
Hi BI_Vijay , hello,_AAndrade, thank you for your prompt reply!
The core issue arises from a shift in the metric’s context.
Please try the following measure to compare the result:Sector Transactions = VAR SelectedSector = SELECTEDVALUE(Customer[Sector Name]) VAR Output1 = IF( ISBLANK(SelectedSector), BLANK(), CALCULATE( SUM('Debit Transaction'[Transactions]), FILTER( ALL(Customer), Customer[Sector Name] = SelectedSector ), FILTER( VALUES(Contract[Commercial Name]), SUM('Debit Transaction'[Transactions]) > 0 ) ) ) RETURN Output1If the issue persists, please upload your sample table data include your relationships for further troubleshooting.
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_Mathur1 year agoSuper User
Hi,
Share the download link of the PBI file.