Forum Discussion

abhishek20_09's avatar
abhishek20_09
New Member
1 year ago
Solved

How to create Filed parameter with Date selection

Hi Folks,

I am new to power BI and got stuck with a requirement.

I have to create a customer service report which displays sum of interaction type(call,Email or Chat) and shows barchart and tabular chart with the data. 

The condition is the data should be filtered by the dynamic slicer. Values are - LastYear, Last month, last qt, last week and yesterday.

When we select LastYear, the viz should show all 12 months of data of last year.

When we select Lastquarter, the viz should display last quarter's 3 months of data(April-june)

LastMonth- Displays last month of data(June)

Last week - Last week of data

Yesterday - yesterday's data 

Please help me to create a expression.

I have a dim date table and also another table which has all the interaction type along with interaction date. Interaction date is joined with Dim date table (Date)

Thanks you.

Regards,

Abhishek

 

  • Hi abhishek20_09,

     

    Thank you for providing detailed information on your issue. I’ve reviewed your scenario and successfully replicated it using sample data on my end.

    I’m sharing the working .pbix file below so you can explore the setup and DAX logic more clearly. Please feel free to open it and review how the relationships and measures are configured:

     

    I hope this helps resolve your issue. If you have any questions or need further clarification, I’m happy to help.


    Thank you.

5 Replies

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi abhishek20_09,

     

    Thank you for providing detailed information on your issue. I’ve reviewed your scenario and successfully replicated it using sample data on my end.

    I’m sharing the working .pbix file below so you can explore the setup and DAX logic more clearly. Please feel free to open it and review how the relationships and measures are configured:

     

    I hope this helps resolve your issue. If you have any questions or need further clarification, I’m happy to help.


    Thank you.

    • v-sgandrathi's avatar
      v-sgandrathi
      Community Support

      Hi abhishek20_09,

       

      .Just a quick check-in! Has your issue been resolved with the information we shared? We’d be delighted to help further if needed.

       

      Thank you.

      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi abhishek20_09,

         

        Just wanted to follow up and confirm that everything has been wrapped up on this. Please let me know if there’s anything pending from my side. Please feel free to reach out Microsoft fabric community forum.

        Thank you.

  • You can also make the dynamic date selection using field parameters for example L1M TO LAST N MONTHS means a drop-down will be provided to the user to select the n months if he selects 6 then L6M data will be filtered