Forum Discussion
kilala
Resolver I
3 years agoHow to Filter Card based on filter in Measure
Hi all,
I have 2 measure [Balance] and [Balance LM]
I have visualise these 2 as TABLE and CARD.
In TABLE, i have following detail only:
In table, I have filtered the visua...
kilala
Resolver I
3 years agoMTD End Date = CALCULATE(ENDOFMONTH(LASTDATE(vw_DimDate[Date])))
MTD End Date LM = CALCULATE(STARTOFMONTH(LASTDATE(vw_DimDate[Date]))-1)
HiraNegi
Resolver II
3 years agoHi kilala ,
Check on below 2 points.
1. Seems your measure expression for Balance is mission FILTER keywork. Please ensure if that is correct.
Balance =
(VAR enddateLM = [MTD End Date LM]
VAR enddate = [MTD End Date]
RETURN
CALCULATE(
sum(vw_FactARAgeingMovement[InvoiceAmount]),
FILTER(vw_DimDate,vw_DimDate[Date]<=enddate),
FILTER(vw_DimInvDate, vw_DimInvDate[Date] <= enddateLM)
))
2. Since the tablaur view is giving you correct data, it is likely that you want the measure to be calculated with Invoive Context. Try to add ALLSELECTED filter in your measure.
Balance =
(VAR enddateLM = [MTD End Date LM]
VAR enddate = [MTD End Date]
RETURN
CALCULATE(
sum(vw_FactARAgeingMovement[InvoiceAmount]),
ALLSELECTED(<TableName>, <InvoiceNumberField>),
FILTER(vw_DimDate,vw_DimDate[Date]<=enddate),
FILTER(vw_DimInvDate, vw_DimInvDate[Date] <= enddateLM)
))
Hope this will help.
- kilala3 years ago
Resolver I
hi HiraNegi ,
I have tried that measure but i am still getting same result as before. I think because i didnt cooperate the filter that i put in table.
In my table, filter I put is:
-invoice number not blank
-Balance LM not blank and not 0.
Any idea to incorporate this into the measure?
Many thanks
- Ashish_Mathur3 years ago
Super User
Hi,
Share some data and show the expected result.
- kilala3 years ago
Resolver I
hi,
attached is for your reference