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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Custom column (Recent Date) not working as filter in visual

hi All,

 

I am working on my first Power BI report. 

 

Requirement is pretty simple. 

I have to visual the data for the latest(MAX) date from the table. 

 

Steps I followed:

1. Created a new column  MaxReportDate= MAX('table_1'[ReportDate]). This gives me maximum date in the data set. 

2. Now in visual, i pull the rest of the data and put this maxReportDate in filter. But nothing happens. the data is not filtered by this column. 

3. How ever, If I pull all the report dates in the visual and then click on recent date, it works. 

4. I also tried creating another column with below query

MaxReportDateFlag = VAR LatestDate =
CALCULATE ( MAX ( 'table_1'[ReportDate]), ALL ( 'table_1' ) )
RETURN
IF ( MIN( 'table_1'[ReportDate] ) = LatestDate, 1, 0 )
5. This calculation is retruning only 0 and not 1 for the max date. 
5. What is it that I am missing ?
 
Any help is appreciated!
1 ACCEPTED SOLUTION

Hi @Anonymous 


1. when we create measure, why is it not seen in data pane (where all columns are seen)?


Measure is different with column.Column could be seen in data table.Measure could be changed with different context in visual.It could be used in visual to get dynamic value.For further,please have a look at below articles to understand it.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

https://www.blue-granite.com/blog/understanding-the-differences-between-calculated-columns-measures-...


2.  I cannot drag this measure under report/page level filter to look for only 1. I have to bring in date and this measure in the visual then filter by 1. I would like to hide this measure from the visual. 

is there a way to do this? 


You may drag it to visual level filter and set it as 1.

1.png

Regards,

 

Community Support Team _ Cherie Chen
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

3 REPLIES 3
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

You may create a measure with your formula instead of column.Below are some articles about column and measure for your reference.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

https://www.blue-granite.com/blog/understanding-the-differences-between-calculated-columns-measures-in-power-bi

1.png

Regards,

Community Support Team _ Cherie Chen
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 very much..

 

I have two questions :

1. when we create measure, why is it not seen in data pane (where all columns are seen)?

2.  I cannot drag this measure under report/page level filter to look for only 1. I have to bring in date and this measure in the visual then filter by 1. I would like to hide this measure from the visual. 

is there a way to do this? 

Hi @Anonymous 


1. when we create measure, why is it not seen in data pane (where all columns are seen)?


Measure is different with column.Column could be seen in data table.Measure could be changed with different context in visual.It could be used in visual to get dynamic value.For further,please have a look at below articles to understand it.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

https://www.blue-granite.com/blog/understanding-the-differences-between-calculated-columns-measures-...


2.  I cannot drag this measure under report/page level filter to look for only 1. I have to bring in date and this measure in the visual then filter by 1. I would like to hide this measure from the visual. 

is there a way to do this? 


You may drag it to visual level filter and set it as 1.

1.png

Regards,

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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