Forum Discussion
Help with ignoring row context
Hi!
I have two tables; One dimension with accounting codes and one fact table with transactions.
I did an easy sum on the transactions like this:
But it is now when things are starting to get tricky for me. I want the sum of a specific range of accounts to be summarized in account no 1099. First I did a measure to define the accounts that should be included (1010-1098). Since the data type of the Account is text I used FORMAT:
[Total_test] give me the same result as [Total_all_accounts], but I want the sum of accounts 1010-1098 on the 1099 account. My best guess is that's because of row context. I hope someone can help me with my issue and show me how to ignore row context on 1099 (or if I made some other misstakes in the previous steps).
Thanks!
Best regards
- Anonymous3 years ago
Hi DaveAng ,
Please try.
Total_all_accounts = [Total] + 01099 = SUMX ( FILTER ( ALL ( 'Dim_Table' ), 'Dim_Table'[Account] >= "1010" && 'Dim_Table'[Account] <= "1098" ), [Total_all_accounts] )Total_test = SWITCH( SELECTEDVALUE('Dim_Table'[Account]), "1099", [1099], [Total_all_accounts] )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
2 Replies
- AnonymousNot applicable
Hi DaveAng ,
Please try.
Total_all_accounts = [Total] + 01099 = SUMX ( FILTER ( ALL ( 'Dim_Table' ), 'Dim_Table'[Account] >= "1010" && 'Dim_Table'[Account] <= "1098" ), [Total_all_accounts] )Total_test = SWITCH( SELECTEDVALUE('Dim_Table'[Account]), "1099", [1099], [Total_all_accounts] )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- DaveAngNew Member
Hi,
Thank you! Your solution worked just fine!
BR