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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KINENE
New Member

HOW TO REFERENCE A MEASURE IN A FILTER

Hello.

I have created a measure 

Report_Day = MAX(DATE_LT[Date])-2
I want to create measures where they reference this measure so i can just change -2 to -1 and the rest of measures work depending on the reporting date.
when i use this measure:
Day_outlet_Txns = CALCULATE(
[outlet_Dep_Txns],
FILTER(ALL(DATE_LT),[Report_Day])
)
i get a value equal to tatal transactions in a table yet i want for transactions of that report day.
When i try something else i get a error
KINENE_0-1655628540649.png

How can i fix this error?

11 REPLIES 11
tamerj1
Super User
Super User

@KINENE 
Please use

Day_outlet_Txns =
VAR RequiredDate = [Report_Day]
RETURN
    CALCULATE (
        [Issuer_Dep_Txns],
        FILTER ( ALL ( DATE_LT ), DATE_LT[Date] = RequiredDate )
    )
KINENE
New Member

Hi Tamerj1,

thanx for help but when i try it out the card returns blank.

KINENE_0-1655699835272.png

 

@KINENE 
Please place [Reporting Date] measure in a card. What do  you get?

This is what i get

KINENE_0-1655700551795.png

 

@KINENE 
Is this the correct reporting date that you want to evaluate your measure based on it?

Yes, it is the correct day

@KINENE 
what is the code for [Issuer_Dep_Txns]?

Issuer_Dep_Txns = COUNTROWS(ISSUER_DEPOSITS_FT)
 
Where ISSUER_DEPOSITS_FT is the fact table

@KINENE 
Would you please check the same date but in the fact table. Is it available in the fact table?

@tamerj1 
Yes, it is available 

KINENE_0-1655705184516.png

 

tamerj1
Super User
Super User

Hi @KINENE 

you are placing the whole date table before the "=" sign. Please use

DATE_LT[Date] = [Report_Day] 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.