Forum Discussion

vinodDrinkPak's avatar
vinodDrinkPak
Icon for Helper II rankHelper II
3 years ago

Duplicate date values in my dropdown list

Hi,

 

with the help of chat GPT i have create a calculated coloumn 

End of Week =
    IF(ISBLANK([Shipment date]), BLANK(),
        [Shipment date] + 7 - WEEKDAY([Shipment date])
    )
But when i use this coloumn as Dropdown in my dashboard, it repeats the values, ideally dropdown should be distinct values. i am not sure why my End of the week is repeating in slicer?
any help or suggestion would be great!
 

 

4 Replies

  • abpgupta's avatar
    abpgupta
    Icon for Continued Contributor rankContinued Contributor

    You probably need to create a separate Date table and join with fact table. That would be more efficient and work all time rather than using DAX functions such as distinct to handle above slicer duplicate issue.

     

    Please search ChatGPT on how to create date table for your model.

       

  • foodd's avatar
    foodd
    Icon for Community Champion rankCommunity Champion

    Hello vinodDrinkPak and thank you for starting a conversation in the Power Query Forum.   It is unclear from your description what the problem with your data model is.   Would you please add your work-in-progress Power BI Desktop file, as well as any source files in Excel format.    To add the file, copy your file to Google Drive, One Drive, or Dropbox, add the anonymous sharing link to the original post, and add a reply to the thread that the post has been updated, and these have been added.  Please also with an image and description, of what the desired results should be.

    • vinodDrinkPak's avatar
      vinodDrinkPak
      Icon for Helper II rankHelper II

      thanks, i manage to resolve the issue, End of week, i have calculated in M Query and then added that to slicer, it sorted out the issue

      • foodd's avatar
        foodd
        Icon for Community Champion rankCommunity Champion

        Great that you self-discovered a working solution!   Please mark this reply as a solution and provide Kudos so that others may find the solution easier.