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
amty63
Helper III
Helper III

how can we custom calculation at row level in Matrix Visual in power BI Desktop

Hi All,

I need to achieve the below result in MATRIX visual where I have measures like "Actual", Budget etc... with the ITEM_ID join to dimension table.... 

 

I don't have information like "Structure", "Productive", "Unpaid Leaves" etc...

How can we calculate these below rows when in few rows we have same ITEM_ID ... we can't use IF ELSE expression here..

 Please help.

 

 

matrixvisualJPG.JPG

 

7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @amty63 

 

Based on your description, I assume that you have three levels and want to calculate 'Actual' for level 1, 'V2' for level 2, 'Budget' for level 3. I created data to reproduce your scenario.

Table:

g1.png

 

You may create a measure as below.

Result = 
IF(
    ISINSCOPE('Table'[Level 3]),
    SUM('Table'[Budget]),
    IF(
        ISINSCOPE('Table'[Level 2]),
        SUM('Table'[V2]),
        IF(
            ISINSCOPE('Table'[Level 1]),
            SUM('Table'[Actual])
        )
    )
)

 

Result:
g2.png

 

Best Regards

Allan

 

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

Thanks Allan for reply, 

However, my requirement is to calculate rows like Structure, Productive, Unpaid leaves, Holidays etc based on item IDs in the fact table.. I have all three facts information in fact table but problem is to calculate Structure, Productive in row whereas some of the itemI Ds are common in these rows..

 

Hope you understand the requirement..

Hi Allan,

 

My question is How will I make Hierarchy based on item IDs  becuase ITEM IDs are common in few cases.. Please refer scrrenshot attached in the question.

I am still waiting of reply. Still looking for the solution..

amitchandak
Super User
Super User

@amty63 , this format is difficult to get. Are you looking for the paginated report?

https://docs.microsoft.com/en-us/power-bi/paginated-reports/paginated-reports-report-builder-power-b...

 

What is format of Source data

what I need to do .. calculate worked days, Structure, Productive on the basis of item_id .. ITEM_ID in the excel for the condition to calculate the measure..

Like IF ITEM_ID =520/410 then Structure IF IITEM_ID= 550/410 then UNPAID LEAVES

Not for paginated report..

Format is normal.. in tables ... but the problem is calclulation at row leavel... is it possible on power BI desktop through any visuals..

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.