Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello ,
I need help in furing out how to write a Dax for dynamic date input.
As shown in the table below, I would like to select my input date column usind a slicer
E.g
Date of Birth
Wedding Date
Divorce Date
And then use the specific date data to build my visualization. The user can then be able to select which of thses dates they want to plot.
Thanks,
Solved! Go to Solution.
Hi @Segun
Based on my understanding:
First, you would like to select from three date columns using a slicer,
Second, users can select from some dates of one column to plot a visual.
For example, I use the following dataset as a test.
First, from “Sheet1”, create three new tables
Table1 = SUMMARIZE ( Sheet1, [Date of Birth], [numnber], [value] )
Table2 = SUMMARIZE ( Sheet1, [Wedding Date], [numnber], [value] )
Table 3 = SUMMARIZE ( Sheet1, [Divorce Date], [numnber], [value] )
Second, create “Date Type” columns in three tables separately.
In Table1
Date Type = IF ( [Date of Birth] <> BLANK (), "Date of Birth" )
In Table2
Date Type = IF ( [Wedding Date] <> BLANK (), "Wedding Date" )
In Table3
Date Type = IF ( [Divorce Date] <> BLANK (), "Divorce Date" )
Third, union three new tables and rename column name as you wanted.
Table 4 = UNION ( 'Table1', Table2, 'Table 3' )
Finally, in Report View, we could add columns “Date Type” and “Date” to slicers.
Best Regards
Maggie
Hi @Segun
Based on my understanding:
First, you would like to select from three date columns using a slicer,
Second, users can select from some dates of one column to plot a visual.
For example, I use the following dataset as a test.
First, from “Sheet1”, create three new tables
Table1 = SUMMARIZE ( Sheet1, [Date of Birth], [numnber], [value] )
Table2 = SUMMARIZE ( Sheet1, [Wedding Date], [numnber], [value] )
Table 3 = SUMMARIZE ( Sheet1, [Divorce Date], [numnber], [value] )
Second, create “Date Type” columns in three tables separately.
In Table1
Date Type = IF ( [Date of Birth] <> BLANK (), "Date of Birth" )
In Table2
Date Type = IF ( [Wedding Date] <> BLANK (), "Wedding Date" )
In Table3
Date Type = IF ( [Divorce Date] <> BLANK (), "Divorce Date" )
Third, union three new tables and rename column name as you wanted.
Table 4 = UNION ( 'Table1', Table2, 'Table 3' )
Finally, in Report View, we could add columns “Date Type” and “Date” to slicers.
Best Regards
Maggie
Thank you! I really appreciate!
I'm trying to create a chart with dynamic date input.
The user would be able to select a date category with a slicer option and the visualization will automatically be populated
The input dates category look like something in the picture below. Thanks for your help.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |