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,
Looking for a solution to my issue currently I am trying to have a duplicate count to display when a room is occupied within a duration of time
Example I want rooms that are the same that have the same room on the same day within the same time range to be counted as a duplicate not just when its start and end time are the same.
Thanks in advance for any help n this subject
bump.
@Anonymous
Try this calculated column
Duplicate Test = VAR CurrentStart = TableName[Date/Start Time Required] VAR CurrentEnd = TableName[Date/End Time Required] RETURN CALCULATE ( COUNTROWS ( TableName ), FILTER ( ALLEXCEPT ( TableName, TableName[Room (Option 1)], TableName[Date Rqeuired] ), OR ( TableName[Date/Start Time Required] > CurrentStart && TableName[Date/Start Time Required] < CurrentEnd, TableName[Date/End Time Required] > CurrentStart && TableName[Date/End Time Required] < CurrentEnd ) ) )
@Zubair_Muhammad
I'm not the most familiar with DAX but that returned this warning
A single value for column 'Date/Start-Time Required' in table 'Overlapping' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
@Anonymous
You tried adding it as a MEASURE....
The formula I wrote was for a calculated colum
There is an option to add Column as well...Please use that OPTION
@Zubair_Muhammad
Thank you for the help with this, I am very new to power BI, but seem to still have an issue with this calculable column it is complaining about a 'Token Eof Expected' on VAR CurrentStart
My code currently looks like this:
Duplicate Test = VAR CurrentStart = Overlapping[#"Date/Start-Time Required"] VAR CurrentEnd = Overlapping[#"Date/End-Time Required"] RETURN CALCULATE ( COUNTROWS ( Overlapping), FILTER ( ALLEXCEPT ( Overlapping, Overlapping[#"Room (Option 1)"], Overlapping[Date Required] ), OR ( Overlapping[#"Date/Start-Time Required"] > CurrentStart && Overlapping[#"Date/Start-Time Required"] < CurrentEnd, Overlapping[#"Date/End-Time Required"] > CurrentStart && Overlapping[#"Date/End-Time Required"] < CurrentEnd ) ) )
I can't share files in post but I have dropped it here...
https://www.dropbox.com/home?preview=Overlapping.pbix
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |