March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
Solved! Go to Solution.
Hi @DaveAng ,
Please try.
Total_all_accounts = [Total] + 0
1099 =
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 Team
If 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
Hi @DaveAng ,
Please try.
Total_all_accounts = [Total] + 0
1099 =
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 Team
If 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
Hi,
Thank you! Your solution worked just fine!
BR
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
84 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |