Forum Discussion
Handling multiple dates with one date picker in semantic model
- 5 months ago
Unpivot Created On and Modified On into single EventDate + EventType columns in Power Query.
Date table connects to EventDate. One slicer filters both. Measures use IF(EventType = "Created", [count], [count]).
Hi
Your understanding is partly correct, but let me clarify precisely how this behaves in Power BI.
- If user selects Created Date โ KPI shows count based on CreatedDate
- If user selects Modified Date โ KPI switches to ModifiedDate
Works perfectly on:
- KPI cards
- Charts
- Tables
If nothing is selected on Data type slicer it will return the default count of values depending upon the active relationship. Just make a slight change to below variable (Assuming created date is your default active relationship)
VAR SelectedType = SELECTEDVALUE ('Date Type'[Type], "Created Date")
If you want instead of showing the default active relationship count you want sum of both (modified and created date), then you can add another condition to the Dax that if data type is deselected or both are selected then show sum of both the variables, which we created in the Dax i shared
making these changes should fix your issue, Let me know what is you require any further assistance
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
is theer any way we can handle both create date and modified date card and detailed tab seperately. As KPI card is seperate on summary page which will show data seperate for modified date and create date. As a next part when some click on that KPI card that will take them to the specific detailed tab.
So can we control the same with one date picker?
Regards
Mohit
- grazitti_sapna5 months ago
Super User
Hi jainmohit0710,
Same measure would work for separate KPI cards, Just apply Type filter in visual filter on them accordingly.