I am doing something like this -
Solved! Go to Solution.
I simply want to return one string value from a table, based on a filter.... That filter will always return one string value (for that table).
I understand CALCULATE is only for numeric measures...
But in this instance CALCULATE also seems to return a string !
I am doing something pretty straightforward.
My first "calculated measure" "MonthYear" returns a value say = "December 2018"
I use this calculated measure "MonthYear" in a different calculated measure as a Filter parameter -
"Revenue" = CALCULATE(SUM(Revenue), FILTER("fact", fact.fiscalMonth = MonthYear))
I can verify that MonthYear measure actually returns "December 2018"
But Revenue measure returns a blank value.
When I replace the MonthYear parameter , with a hard coded value
"Revenue" = CALCULATE(SUM(Revenue), FILTER("fact", fact.fiscalMonth = "December 2018" )) - Now this returns proper revenue value.
I do not understand why this is happening ! This is just so Bizzare.
Glad it worked.
When you use a MEASURE inside a FILTER function, it is evaluated for each row of the Table inside FILTER function (in your case it is FACT table)
That's why we have to store its value first in a variable
FILTER ( fact, fact[fiscalMonth] = [Measure] ) )
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Visit our Community Blog for articles, guides, and information created by fellow community members.
Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.
We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.