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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Sanskruti
Helper II
Helper II

Getting blank values in table

Hello,

I have a file 1 where i have a table in that i'm getting blank values for 19 september. In that i have created a column as 
Slicer = IF('common DimDate'[Full_Date]=TODAY()-1,"Last Date",IF('common DimDate'[Full_Date]<'common DimDate'[Full_Date],'common DimDate'[Full_Date]&""))

In file 2 instead of today-1 i'm using relative date filter. But in that i'm getting 6 values for date 19 spetember.

 

I have created join with full date and date used in another table. 

Any idea how why i'm getting blank values in file 1?

Thank you

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Sanskruti ,

 

As far as I know, relative date slicer is a time interval to filter the minimum and maximum values in the interval, so you need to use two dates in dax, you can use minx() and Maxx() to get the data.

The difference between calculated column and measure is:

Calculated column values are calculated during data refresh and use the current row as the context; it does not depend on user interaction in the report. The measure value operates on the data aggregation defined by the current context, which depends on the filters applied in the report.

So most of them are used for measure when performing filters.

You can try the following dax:

IF=
var _mindate=MINX(ALLSELECTED('Table'),[Date])
var _maxdate=MAXX(ALLSELECTED('Table'),[Date])
return
IF(
    MAX('common DimDate'[Full_Date]) >=_mindate&&MAX('common DimDate'[Full_Date])<=_maxdate,
    "Last Date",
    IF(
         MAX('common DimDate'[Full_Date])<
        MAX('common DimDate'[Full_Date]),MAX('common DimDate'[Full_Date])&""
  ))

vyangliumsft_0-1695349524679.png

 

 

Best Regards,

Liu Yang

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @Sanskruti ,

 

As far as I know, relative date slicer is a time interval to filter the minimum and maximum values in the interval, so you need to use two dates in dax, you can use minx() and Maxx() to get the data.

The difference between calculated column and measure is:

Calculated column values are calculated during data refresh and use the current row as the context; it does not depend on user interaction in the report. The measure value operates on the data aggregation defined by the current context, which depends on the filters applied in the report.

So most of them are used for measure when performing filters.

You can try the following dax:

IF=
var _mindate=MINX(ALLSELECTED('Table'),[Date])
var _maxdate=MAXX(ALLSELECTED('Table'),[Date])
return
IF(
    MAX('common DimDate'[Full_Date]) >=_mindate&&MAX('common DimDate'[Full_Date])<=_maxdate,
    "Last Date",
    IF(
         MAX('common DimDate'[Full_Date])<
        MAX('common DimDate'[Full_Date]),MAX('common DimDate'[Full_Date])&""
  ))

vyangliumsft_0-1695349524679.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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