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
Varishtha
Frequent Visitor

How to plot quarterwise measure on line chart with month-based X-axis

I have a measure(say "SK4") which holds significance only if calculated quarter wise. 
Now I want to create a new measure (say "BK", where BK=sales*SK4). 

I want to plot this "BK" measure on a line graph, where X-axis will be monthwise.

Now since the x-axis is in months, the value SK4, hence BK4, will be calculated monthwise. But, I want that while calculating BK, it should consider quater wise value of SK4 , not month wise. 

How can I achieve this? 

1 ACCEPTED SOLUTION
v-heq-msft
Community Support
Community Support

Hi @Varishtha ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1714613835364.png

Create measures

SK4 = 
CALCULATE(
    AVERAGE('Table'[Price]),
    ALLEXCEPT(
        'Table',
        'Table'[Quarter]
    )
)
Total = [SK4]*SELECTEDVALUE('Table'[Sales])

Final output

vheqmsft_1-1714613918405.png

Because measure takes effect based on context, not only do you need to place the date column on the x-axis, but you also need to place the quarter column on the x-axis as well

vheqmsft_2-1714614044377.png

Best regards,

Albert He

 

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

 

View solution in original post

2 REPLIES 2
v-heq-msft
Community Support
Community Support

Hi @Varishtha ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1714613835364.png

Create measures

SK4 = 
CALCULATE(
    AVERAGE('Table'[Price]),
    ALLEXCEPT(
        'Table',
        'Table'[Quarter]
    )
)
Total = [SK4]*SELECTEDVALUE('Table'[Sales])

Final output

vheqmsft_1-1714613918405.png

Because measure takes effect based on context, not only do you need to place the date column on the x-axis, but you also need to place the quarter column on the x-axis as well

vheqmsft_2-1714614044377.png

Best regards,

Albert He

 

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

 

Hi @v-heq-msft , 

Thank you. This was really helpful. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.