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

Stack Bar Using Measure from different table

Hello,

 

I have 3 tables that I am using viewProdRemedyIncidentServicesSla(TableA), viewProdRemedyWorkorders(TableB) and Date table.

 

TableA and TableB have a measure to calculate Resolved Tickets in a weeks. These table are join to Date table using DateKey column.

 

Date table has columns like Date, DateKey, WeekDuration, Month, etc.

 

Measures created for TableA and TableB is below -

TableA

INCIDENT COUNT RESOLVED =
CALCULATE (
    DISTINCTCOUNT ( viewProdRemedyIncidentServicesSla[INCIDENT NUMBER] ),
    FILTER (
        ALL ( viewProdRemedyIncidentServicesSla ),
        ( viewProdRemedyIncidentServicesSla[STATUS] = "Closed"
            || viewProdRemedyIncidentServicesSla[STATUS] = "Resolved" )
            && viewProdRemedyIncidentServicesSla[WeekNumberResolved]
                = MAX ( viewProdRemedyIncidentServicesSla[WeekNumberSubmit] )
            && viewProdRemedyIncidentServicesSla[INCIDENT LAST RESOLVED DATE].[Year] = 2018
    )
)

TableB

WORKORDER COUNT RESOLVED =
CALCULATE (
    COUNT ( viewProdRemedyWorkorders[WORK ORDER ID] ),
    FILTER (
        ALL ( viewProdRemedyWorkorders ),
        ( viewProdRemedyWorkorders[STATUS] = "Closed"
            || viewProdRemedyWorkorders[STATUS] = "Completed" )
            && viewProdRemedyWorkorders[WeekNumberResolved]
                = MAX ( viewProdRemedyIncidentServicesSla[WeekNumberSubmit] )
            && viewProdRemedyWorkorders[ACTUAL END DATE].[Year] = 2018
    )
)

Using these I want to create a stack bar - stackbar.png

 

 

Thanks in Advance

5 REPLIES 5
v-jiascu-msft
Employee
Employee

Hi @ashaikh,

 

Are they two measures? If so, you can add them to the Value field of the Stacked Column chart. Please refer to snapshot below.

Stack-Bar-Using-Measure-from-different-table

 

 

Best Regards,
Dale

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

Yes they are 2 measure. If you see the formula how they are build, because of that it does not properly get mapped based on week duration.

 

By this what do I mean is, the value shown for each date or each category is same.

Hi @ashaikh,

 

Can you share the file or a dummy sample? 

1. Do these tables have proper relationships?

2. The weeks should be from the Date table.

 

 

Best Regards,
Dale

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

@v-jiascu-msft yes they have proper relationships.

 

By the looks what is happening is if you look at the measure in filter I am using ALL for the table. And I have to use that because I am generating weekly report and I want to consider all the tickets which have been resolved in the particular irrespective of when they were created. 

Hi @ashaikh,

 

Can you share your file or a sample?

 

 

Best Regards,
Dale

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

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.