Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Issue with fromDate to ToDate

Hi All,

 

I have a scenarior to filter out date range from two columns

FromDate, ToDate

 

for that, I have created one Measure

 

Measure =
IF (
SELECTEDVALUE ( 'Table'[SrFromDate] ) <= MAX ( DimDate[FullDateAlternateKey] )
&& SELECTEDVALUE ( 'Table'[SrToDate] ) >= MIN ( DimDate[FullDateAlternateKey] ),
1,0
)
 
and used this measure in visual level filters and set to 1.
Its working fine If i have multiple columns available in grid.
But it does not work fine if i just want to see count of particular row in any other seprate grid.
 
Any idea how to fix this?
 
 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Can you explain "But it does not work fine if i just want to see count of particular row in any other seprate grid." through a sample ? Or you can provide a pbix file to explain your need and expected result .

     

    Best Regards,
    Community Support Team _ Ailsa Tao

    • Anonymous's avatar
      Anonymous
      Not applicable

      How to attache PBix file here? not able to see any option,

      • Anonymous's avatar
        Anonymous
        Not applicable

        either import your pbix to one drive or google cloud then click on share and post the link

  • Anonymous's avatar
    Anonymous
    Not applicable

    usually when you select a slicer, the selcted value becomes in the range of the selected range of date,
    so try remove filters with the dax calculation to something like

    measure = IF (
    SELECTEDVALUE ( 'Table'[SrFromDate] ) <= calculate(MAX ( DimDate[FullDateAlternateKey] ),removefilters(dimdate[date]))
    && SELECTEDVALUE ( 'Table'[SrToDate] ) >= CALCULATE(MIN ( DimDate[FullDateAlternateKey] ),removefilters(dimdate[date])),
    1,0
    )