Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mohsinmasood
Frequent Visitor

DAX Measure calculation

i want to calculate sum of value based on group how can i do this without creating relationship.

for example

 CALCULATE(SUM('Financial Data'[Value]),BS[Group]="Bank balances and cash")
 
then after that i have to use this under switch like 
SWITCH(SELECTEDVALUE(BS[Group]),"Bank balanes and cash",[Bank balances and cash])

 

i am trying these above formulas but these are not working

 

final outcome should be used in this visual 

 

mohsinmasood_2-1718285862809.png

 

 

mohsinmasood_1-1718285600522.png

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi, @mohsinmasood 

The initial formula may be missing a function that correctly applies the filter context. I revised it.

BankBalancesAndCash = CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Group] = "Bank balances and cash"
    )
)

 

Here is my preview:

vyohuamsft_1-1718333220320.png

 

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

let me try this i have one more question about running sum like below example 

mohsinmasood_2-1718348854939.png

 actually i am trying to build Balance sheet so the mechanism for BS is last year sum of value should add to next year transaction 

mohsinmasood_3-1718349216658.png

 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.