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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Trying to separate value by the rows

I am sharing my Pbix file here.

 

I am trying to work with financial statement, and trying to allocate values based on "Financial" (category).

So,

If it is "Census - Med A", it will show 1000.

If it is "Census - Med HMO", it will show 2000.

 

JustinDoh1_0-1656118788433.png

 

I have Two (type of) measures:

JustinDoh1_3-1656119131588.png

 

JustinDoh1_1-1656118887178.png

 

The issue is that, it sums up everything (1000+2000+...6000) = 21K, instead of dividing into different line item (on the visual):

JustinDoh1_2-1656118974157.png

This is expected output:

JustinDoh1_0-1656124367734.png

 

 

I was following this YouTube channel, but I am not sure what I am missing.

 

Thanks.

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@JustinDoh1 , Based on what I got, Change the measure like

Financial Value = 
Sumx( Values('Structure'[Line Item ID]), CALCULATE( SWITCH(
    SELECTEDVALUE('Structure'[Line Item ID]),
    "Census - Med A", [Census - Med A],
    "Census - Med HMO", [Census - Med HMO]
 )))

View solution in original post

@amitchandak 

I realized that measure for each calculation was wrong:

I changed to this:

JustinDoh1_0-1656370377209.png

It is now working.

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@JustinDoh1 , Based on what I got, Change the measure like

Financial Value = 
Sumx( Values('Structure'[Line Item ID]), CALCULATE( SWITCH(
    SELECTEDVALUE('Structure'[Line Item ID]),
    "Census - Med A", [Census - Med A],
    "Census - Med HMO", [Census - Med HMO]
 )))

@amitchandak 

Thanks for help.

I modified the measure like you mentioned, but I am still getting 21000.

JustinDoh1_0-1656208879414.png

JustinDoh1_1-1656208928419.png

What am I missing?

Thanks.

 

 

@amitchandak 

I realized that measure for each calculation was wrong:

I changed to this:

JustinDoh1_0-1656370377209.png

It is now working.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.