Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Folks,
I have been stuck with this issue for quite some time now.
Here is the measure:
OCR MAT Trend =
VAR LFLTenants =
CALCULATETABLE (
VALUES ( 'Financial Metrics'[Tenant Code] ),
'Financial Metrics'[Is LFL MAT] = TRUE ()
)
RETURN
CALCULATE (
[OCR],
//'Tenants'[Tenant Code] IN LFLTenants,
DATESBETWEEN (
'Trend Date'[Date],
NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Trend Date'[Date] ) ) ),
LASTDATE ( 'Trend Date'[Date] )
),
ALLEXCEPT ( 'Date', 'Date'[Date] )
)
It's working fine as it is. I am using this measure to show Moving Annual Total Values for last 12 months.
But When I Remove the comments from this line,
//'Tenants'[Tenant Code] IN LFLTenants,
It starts returning Moving Annual Total Value of Selected Month only, hence ignoring AllExcept Filter at all. According to my reserach, I am missing KeepFilters or RemoveFilters function somehow but not sure where.
Hi @adnaaan ,
Try to update ALLEXCEPT ( 'Date', 'Date'[Date] ) to ALLSELECTED('Date'[Date])
or
add KEEPFILTERS(Filter conditions affecting [OCR])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft , Thanks for your time.
Changing AllExcept to AllSelected isn't working.
Before Making Change:
After Enabling Filter:
After Changing AllExcept to AllSelected:
Using Keepfilters:
@Greg_Deckler Can you also please look into it?
Hi @adnaaan ,
Could you share the sample pbix via cloud service like onedrive for business?
Please remove any sensitive data before uploading.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@adnaaan , Tray a measure like this with Date table
Rolling 12 = CALCULATE([OCR],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Hi Amit! Thanks for your reply.
But it's behaving the same way. As soon as I put LFLTenants filter in this calculate function after datesinperiod, It starts returning MAT of only Current Month.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
104 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |