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
Anonymous
Not applicable

Matrix Visual

HI,

 

I have 1 table with a flag column act n bud in that table I have 11 value columns which I'm showing like this via matrix visual.

 

 budact
sales1012
cost157
nep48
gwp200125
direct25070
indirect%12%15%
delta22

 

But I want to show it like this ,

 

 budactdelta
sales10122
cost1578
nep484
gwp20012575
direct25070180
indirect%12%15%-3.00%

 

so instead of showing delta column below of indirect, I want to show it beside act n bud , delta of every row.

 

But the rows sales,cost, nep etc are not dax they are base value in Table

7 REPLIES 7
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

 

Has your problem been solved? If my post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Community Support Team _ kalyj

Anonymous
Not applicable

 

This is the data I have

MonthchaneltypeChannelsalescostnepgwpdirect%indirect%flag
APRmscrenewedmsc10.0014,314.0065,653.00123.001,323.0%1,234.0%act
APRmscFRESH BUSINESSmsc12.001,142.003,141.0023,453.006,500.0%1,423.0%bud
APRrequsedmsc0.00124.00789.00654.0023,400.0%1,543.0%act
APRrequsedmsc21.0014,321.001,323.0057.00100.0%154.0%bud
APRqwerenewedmsc21.00312.001,231.0068,765.001,500.0%9,876.0%bud
APRqweFRESH BUSINESSmsc6,778.001,323.00987.003,456.0087,65,400.0%5,78,690.0%act

Please insert this data in power query

 

then take matrix visual insert  flag in column & gwp,nep etc in values now  I need a delta column beside bud & act

 

 budact
sales1012
cost157
nep48
gwp200125
direct25070
indirect%12%15%
delta22

 

 

Hi @Anonymous ,

I wonder how the value in your snapshot got, for example the sales of bud is 10 in the second visual, but in the first visual it's values are 12,21,21, I'm not very clear about the logic of your result.

vkalyjmsft_0-1639477741681.png

If you want the sum sales of bud, it should be 54, and other value should be like this:

vkalyjmsft_1-1639477989097.png

Best Regards,
Community Support Team _ kalyj

 

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, in my understanding, delta is a result of the difference of bud and act, its hard to achieve in matrix by my test, but I get the same result by another method.

1.This is my sample by your description, I use pivot column in PowerQuery.

vkalyjmsft_0-1638785066209.png

 

vkalyjmsft_1-1638785066212.png

 

vkalyjmsft_2-1638785066214.png

 

2.Cteate a measure delta.

delta =
CALCULATE (
    MAX ( 'Table'[bud] ) - MAX ( 'Table'[act] ),
    'Table'[Column2] = MAX ( 'Table'[Column2] )
)

3.Get the result.

vkalyjmsft_3-1638785066214.png

 

4.IF you want all the value are negative, you can modify it like this:

delta =
VAR _V =
    CALCULATE (
        MAX ( 'Table'[bud] ) - MAX ( 'Table'[act] ),
        'Table'[Project] = MAX ( 'Table'[Project] )
    )
RETURN
IF ( _V < 0, _V * -1, _V )

vkalyjmsft_4-1638785066215.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

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

Anonymous
Not applicable

I want to share the pbix file here can someone tell how to do that?

 

FarhanAhmed
Community Champion
Community Champion

Can you please share some data samples for this... If I assume that your table 1 is the original source then why aren't you creating a calculated column for delta by simply  Actual-Budget.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Anonymous
Not applicable

This is the data I have

MonthchaneltypeChannelsalescostnepgwpdirect%indirect%flag
APRmscrenewedmsc10.0014,314.0065,653.00123.001,323.0%1,234.0%act
APRmscFRESH BUSINESSmsc12.001,142.003,141.0023,453.006,500.0%1,423.0%bud
APRrequsedmsc0.00124.00789.00654.0023,400.0%1,543.0%act
APRrequsedmsc21.0014,321.001,323.0057.00100.0%154.0%bud
APRqwerenewedmsc21.00312.001,231.0068,765.001,500.0%9,876.0%bud
APRqweFRESH BUSINESSmsc6,778.001,323.00987.003,456.0087,65,400.0%5,78,690.0%act

 

I'm using flag in column matrix visual so it shows like this & insert all values gwp,sales etc in values

 

 budact
sales1012
cost157
nep48
gwp200125
direct25070
indirect%12%15%
delta22

 

 

now I want to get delta for every row sales, gwp etc

 

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.

Top Solution Authors
Top Kudoed Authors