Forum Discussion
SumIf
- 1 year ago
Hi kevbrown1980 ,
We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out and consider sharing a sample PBIX file or a small sample dataset so that we can reproduce the issue from our end and guide more accurately.
Thank you.
Hi kevbrown1980 ,
Thanks for sharing the scenarion in Microsoft Fabric Coimmunity.
I tried reproducing this using some sample data structured like your scenario, where the expense description is in a dimension table and the YTD values are in a related fact table. I used a measure like below and it’s working at my side:
YTD Total =
SUMX (
Fact_Financials,
IF (
RELATED ( Dim_Account[Level 5 Expense Description] ) = "Contract Income - Fixed",
Fact_Financials[Budget - YTD],
Fact_Financials[Actual - YTD]
)
)
Please make sure there is a relationship between Dimension and FactTable based on the appropriate key column.
If you're still facing errors, please consider sharing a sample PBIX file or a small sample dataset so that we can reproduce the issue from our end and guide more accurately.
Hope this helps. Please reach out for further assistance.
Thank you.
Please find the attached .pbix for reference.
Also thanks to mdaatifraza5556 and bhanu_gautam for your help.