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.
Hi all,
I have an events dataset with these columns
Events Table creation in DAX
I am trying to look for the most accurate/appropiate type for a field with minute:seconds
something like
mm:ss (for me hour or time is not valid because mm can be > 59 it is a soccer/rugby match duration time) and I would require an slicer/Slicer with mm:ss if possible/existing any custom visual/custom slider?
mm:ss
00:00
15:43
70:15
90:30
My requirement is to have a minute:seconds smart filter/slider ideally like the one available for integer, number and date fields in powerbi
Solved! Go to Solution.
Hi, @dpombal
Based on your description, I have tried and not found a way to solve it with 'mm:ss' format. As a workaround, you may achieve your requirement with total seconds. You can create a calculated table and two calculated columns in Slicer table as follows.
Slicer = CROSSJOIN(
SELECTCOLUMNS(
GENERATESERIES(0,MAX('Events'[min]),1),"Minutes",[Value]),
SELECTCOLUMNS(
GENERATESERIES(0,59,1),"Second",[Value])
)
Show = [Minutes] & " : " & [Second]
Total = Slicer[Minutes] * 60 + Slicer[Second]
Then you may create a calculated column in Events and create a relationship between 'Events' table and 'Slicer' table based on 'Total' columns.
Total = Events[min] * 60 + Events[sec]
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @dpombal
Based on your description, I have tried and not found a way to solve it with 'mm:ss' format. As a workaround, you may achieve your requirement with total seconds. You can create a calculated table and two calculated columns in Slicer table as follows.
Slicer = CROSSJOIN(
SELECTCOLUMNS(
GENERATESERIES(0,MAX('Events'[min]),1),"Minutes",[Value]),
SELECTCOLUMNS(
GENERATESERIES(0,59,1),"Second",[Value])
)
Show = [Minutes] & " : " & [Second]
Total = Slicer[Minutes] * 60 + Slicer[Second]
Then you may create a calculated column in Events and create a relationship between 'Events' table and 'Slicer' table based on 'Total' columns.
Total = Events[min] * 60 + Events[sec]
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It is a workarond...although i wish a time slicer soon..thanks
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |