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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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