cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
erikzzy
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
amitchandak
Super User
Super User

@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 !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@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 !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

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

 

AiolosZhao
Memorable Member
Memorable Member

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!




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

 

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!




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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.