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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
willatkinson
Helper II
Helper II

Expressions based on visualisation figures

Hi all,

 

I had a table visualisation that was split into quaters via a date hiearchy.

 

I was wondering if you are able to to calculate expressions based on values that are produced by a visual, that don't appear in the tables of the model itself? 

 

For example could I write expressions that include the values of Qtr 2 here, even though the coloum isn't in the data model?

willatkinson_0-1712590182053.png

 

Cheers,

 

3 REPLIES 3
Anonymous
Not applicable

Hi @willatkinson ,

 

This effect can be achieved using the DATESBETWEEN function.Refer to the following:

Quarter 2 Sales = 
CALCULATE(
    [total_sales],
    DATESBETWEEN(
        'Date'[Date],
        DATE(Year(TODAY()), 4, 1),
        DATE(Year(TODAY()), 6, 30)
    )
)
Quarter 3 Sales = 
CALCULATE(
    [total_sales],
    DATESBETWEEN(
        'Date'[Date],
        DATE(Year(TODAY()), 7, 1),
        DATE(Year(TODAY()), 9, 30)
    )
)

 

vkongfanfmsft_0-1712632418732.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.

willatkinson_1-1712649962636.png

This is what I get, it doesn't pick up the date field I'm trying to reference, and won't pick up a column in place of [total_sales]

Anonymous
Not applicable

Hi @willatkinson ,

 

Can you provide some test data to facilitate me to answer your question as soon as possible?

 

Best Regards,
Adamk Kong

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors