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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Issues with CrossFilter

Hi,

I have 2 columns Accounting and Date joined via Both side filter in model. For a measure, I am using crossfilter to override this join as Single side -

 

My crossfilter on Accounting and Date table works as expected, when I run the following DAX (i.e. returns values for dates which might not have accounting entries):

Cumulative Amount=
var total = CALCULATE([Amount],CROSSFILTER('Date'[Date],Accounting[Effective Date],OneWay),ALLSELECTED('Accounting'))
return total
 
But the results are not as expected when I add an additional filter on date (i.e. it does not return values for the dates where there are no entries in accounting:
Cumulative Amount=
var total = CALCULATE([Amount],CROSSFILTER('Date'[Date],Accounting[Effective Date],OneWay),FILTER(all('Date'),'Date'[Date]<=max('Date'[Date])),ALLSELECTED('Accounting'))
return total
 
Is that a limitation or is there a workaround?
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Looking at this I am not sure on the need of ALLSELECTED('Accounting')

 

remove that and try. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak , I am unable to share any file outside my org network.

 

The ALLSELECTED('Accounting') was used from my original which is slightly more complex. But even after removing that there is no change in output:

Amount (As on date) - INR =
var total = CALCULATE([Amount (For the period) - INR],CROSSFILTER('Date'[Date],Accounting[Effective Date],OneWay),FILTER(all('Date'),'Date'[Date]<=max('Date'[Date])))
return total
Following is the output when I use both side filter b/n Accounting and Date: 

 

Shailee_0-1600665195824.pngShailee_1-1600665367829.png

 

Following is the expected/required output achieved with single side filter b/n Accounting and date:

Shailee_2-1600665451839.png

Shailee_3-1600665482115.png

But I need to keep the Filter b/n Accounting and Date to Both side for some other use case, hence was tring to override the filter just for this measure. But its not working. Any idea, where its going wrong?

 

Thanks,

Shailee

 
 
 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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