cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

use mesure as filter. but doesn't work.

Hello everyone,

 

I want to use one measure recent as filter. My power bi use DirectQuery. So I can't use calculate or maxx to add one calculated column.

As the first print screen, I want to only keep recent = 0.

erikzzy_0-1594335488540.png

 

So I add recent in filter section. Then I choose  recent is 0.

erikzzy_1-1594335546143.png

Recent is a measure for choose the most recent record. 

 

erikzzy_3-1594335676228.png

 

 

Finally, the result is blank. 

erikzzy_2-1594335582466.png

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IX
Super User IX

Re: use mesure as filter. but doesn't work.

@erikzzy , Seem like you need data when created at = updated at individual table

 

calculate([Recent],report[createdate]=report[updatedat])
or
calculate([Recent],filter(report,report[createdate]=report[updatedat]))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

6 REPLIES 6
Highlighted
Super User II
Super User II

Re: use mesure as filter. but doesn't work.

Hi @erikzzy ,

 

I have a workaround for you, if your table only has this measure.

 

Then you can try to create another measure or change the recent to the below one:

 

if recent = 0, 0, blank()

 

And I think the table will show what you want.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Super User IX
Super User IX

Re: use mesure as filter. but doesn't work.

@erikzzy , Seem like you need data when created at = updated at individual table

 

calculate([Recent],report[createdate]=report[updatedat])
or
calculate([Recent],filter(report,report[createdate]=report[updatedat]))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Helper II
Helper II

Re: use mesure as filter. but doesn't work.

Hi @AiolosZhao ,

 

Thanks your reply.

I try your solution. But in fact there lastDate is another measure. So my table do not work.
I have tried your proposition,

erikzzy_1-1594349296612.png

 

erikzzy_0-1594349146622.png

 

Highlighted
Helper II
Helper II

Re: use mesure as filter. but doesn't work.

Hello @amitchandak,

 

Thanks your reply, 

I have tried your solution. 

erikzzy_0-1594349471982.png

If I use measure 2 to filter, my table is blank like this,

erikzzy_1-1594349561840.png

 And  I can't understand what do you meaning in an individual table. I need a new table only one measure [recent]?

Thank you again,

ErikZhang

 

Highlighted
Super User II
Super User II

Re: use mesure as filter. but doesn't work.

Hi @erikzzy ,

 

Could you please show some sample data and the result that you want in a screenshot or excel?

 

Thanks.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Helper II
Helper II

Re: use mesure as filter. but doesn't work.

Thanks your reply. I found a problem of data modelling.  

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors
Users online (611)