cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hebavarkey Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

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

hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

Thank You. It worked

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

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.
hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

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. 

Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

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

hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

Thank You. It worked

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)