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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bhattyzlatan
Regular Visitor

Need help with creation of a measure for a line chart.

Hi ,

So there is a Line graph, where the x-axis is a date field called weekend (friday). In the Y-axis, I have to show 2 fields.

First field is called Resolved SLA%. The formula for getting this is 

Resolved SLA%= (if(SUM(vw1[Closed Tickets])=0,0,(SUM(vw1[Resolved Values])/SUM(vw1[Closed Tickets])))). 
So, for every weekend value, the graph shows the Resolved SLA% correctly.
Now, I need to create a new field, the resolved SLA% needs to be 5% higher than the existing resolved SLA%, but this increase in % will be only for last 3 weekends only as shown below. I need to show the % in line chart against the weekend dates.
Weekend = FORMAT( ('vw1'[created_date] - mod(vw1[created_date] -1,7)+5),"DD/MMM/YY")
 
weekendResolved SLA%New Resolved SLA%
08-Mar-2480%80%
15-Mar-2481%81%
22-Mar-2473%73%
29-Mar-2478%83%
05-Apr-2484%89%
12-Apr-2490%95%

 

4 REPLIES 4
bhattyzlatan
Regular Visitor

@v-kongfanf-msft I am still facing the issue. I also keep getting thsi error - Circular dependencies in calculated columns

bhattyzlatan
Regular Visitor

Hi @v-kongfanf-msft , really appreciate your help in this regard. 

bhattyzlatan
Regular Visitor

bhattyzlatan_0-1713427460016.png

I am getting this error when I used this formula. Weekend is again a column created from created date. Is this why I am seeing this error? 

v-kongfanf-msft
Community Support
Community Support

Hi  @bhattyzlatan ,

 

You can try formula like below:

New Resolved SLA%_ =
VAR LastThreeWeekends =
    TOPN ( 3, VALUES ( 'vw1'[weekend] ), 'vw1'[weekend], DESC )
VAR ResolvedSLAPercent = [Resolved SLA%]
RETURN
    IF (
        'vw1'[weekend] IN LastThreeWeekends,
        ResolvedSLAPercent + 0.05,
        ResolvedSLAPercent
    )

vkongfanfmsft_0-1713408067238.png

 

Best Regards,
Adamk Kong

 

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

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.