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
Anonymous
Not applicable

How to determine the Date level for a calculation

I have an interesting problem.  I need to base a calculation on the date level (see example below) but have been unable to get the correct results.  I would like to use a single calculation but have it change based on the date hierarchy level.

 

Monthly
Divide(A + ( (B+C) * 12), A)

 

Quarterly

Divide(A + ( (B+C) * 4), A)

 

Yearly

Divide(A + ( B+C) , A)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get it:

Measure =
VAR _value =
    IF (
        ISINSCOPE ( 'Date'[Date].[Year] )
            && NOT ( ISINSCOPE ( 'Date'[Date].[Quarter] ) ),
        1,
        IF (
            ISINSCOPE ( 'Date'[Date].[Quarter] )
                && NOT ( ISINSCOPE ( 'Date'[Date].[Month] ) ),
            4,
            12
        )
    )
RETURN
    DIVIDE ( A + ( ( B + C ) * _value ), A )

 

If the above one is not your expected result, please provide more raw data in your table MP921000 (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get it:

Measure =
VAR _value =
    IF (
        ISINSCOPE ( 'Date'[Date].[Year] )
            && NOT ( ISINSCOPE ( 'Date'[Date].[Quarter] ) ),
        1,
        IF (
            ISINSCOPE ( 'Date'[Date].[Quarter] )
                && NOT ( ISINSCOPE ( 'Date'[Date].[Month] ) ),
            4,
            12
        )
    )
RETURN
    DIVIDE ( A + ( ( B + C ) * _value ), A )

 

If the above one is not your expected result, please provide more raw data in your table MP921000 (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Anonymous
Not applicable

That was exactly what I needed - thx!!

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