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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
NewPBIe
Helper II
Helper II

Filter by fiscal year in a measure

Hello everybody.
 
I want this measure to calculate this Percentage using only tasks that belongs to the actual fiscal year.
Measure = 
IF(ISBLANK([All Completed Tasks]/[All Tasks]), 0, [All Completed Tasks]/[All Tasks]*100)
 
I've a DAX calculated column "Year to fiscal year" 
Year to fiscal year = LOOKUPVALUE(Fiscal Year, Calender[Year], YEAR(Task[TaskFinish Date]), Calender[Month], MONTH((Task[TaskFinish Date]), 0)
 
But I am not able to reach "Year to fiscal year" from my measure and set a FILTER.
 
"Year to fiscal year" is in Table 1. Table 1 has a *:1 relation to Calender (from Calender to Table1).
 
What am I doing wrong?
 
Thank you in advance
2 REPLIES 2
Arul
Super User
Super User

@NewPBIe ,

Can you try this formula?

Measure = 
IF(
    ISBLANK([All Completed Tasks] / [All Tasks]),
    0,
    CALCULATE(
        [All Completed Tasks] / [All Tasks] * 100,
        FILTER(
            'Table 1',
            'Table 1'[Year to fiscal year] = MAX(Calender[Fiscal Year])
        )
    )
)

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Thank you Arul, 

 

unfortunately is the Table 1 not reachable from the measure:

 

NewPBIe_0-1676896612557.png

 

I can only reach this "'Heutiges Datum' but no Field in the Table 1.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.