Forum Discussion

Sanskruti's avatar
Sanskruti
Helper II
2 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    2 years ago

    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])&""
      ))

     

     

    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.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    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])&""
      ))

     

     

    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.