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

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.

Reply
Anonymous
Not applicable

Issue with DAX filter using a measure created

Hi Team, I am new to Power BI. For a customer report we are using the direct query option as we  require real time data refresh and have complex secuirty implementations in the platform side. For a specific report we were trying to create filtered table using DAX Filter as 

latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

MAXSnapShotID is a measure we have created as calculate(max(OriginalTable[SnapshotId]))

This is giving the error of over running the 1 million row limitation. However we used  the Card Visual to see value for the MAXSnapShotID. Its showing a value. However when i hardcoded the dax filter as latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[value seen in the card visual]). This is working fine and records are being extracted. 

Request your support here .  Also would like to know if we can see the queries being run on the data source when we apply the dax filter.

Many thanks in advance. 

2 ACCEPTED SOLUTIONS

Hi @Anonymous 

 

Coz they are the indifferent context in your formula:

I'd suggest you use below measure instead:

[MAXSnapShotID] =MAXX(ALL('OriginalTable'),[SnapshotId])
then
latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

Or:

latestsnapshottable = var a = MAX('OriginalTable'[SnapshotId])
Return Filter(OriginalTable;OriginalTable[SnapshotId]=a)
Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

Anonymous
Not applicable

Thank You. It worked

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

There is a 1 million row limit for returning data using DirectQuery. This does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.

 

You can use the DAX studio to capture queries in power bi, please refer to the blog: https://www.sqlbi.com/articles/capturing-power-bi-queries-using-dax-studio/

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Can you please help me understand why we are unable to  create filtered table using DAX Filter as 

 

latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

 

MAXSnapShotID is a measure we have created as calculate(max(OriginalTable[SnapshotId]))

 

This is giving the error of over running the 1 million row limitation. However we used  the Card Visual to see value for the MAXSnapShotID. Its showing a value. However when i hardcoded the dax filter as latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[value seen in the card visual]). This is working fine and records are being extracted. 

Hi @Anonymous 

 

Coz they are the indifferent context in your formula:

I'd suggest you use below measure instead:

[MAXSnapShotID] =MAXX(ALL('OriginalTable'),[SnapshotId])
then
latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

Or:

latestsnapshottable = var a = MAX('OriginalTable'[SnapshotId])
Return Filter(OriginalTable;OriginalTable[SnapshotId]=a)
Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Thank You. It worked

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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