Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hey Guys,
I have the issue, that my data involves dates, some with duplicates, some without. Now what I need/want to do, is:
1. instead of deleting the duplicates make them to null values.
2. tranform all the remaining date values into integer.
Thanks for the help, cheers!
Nick
Hi @Nick2,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @v-piga-msft,
tahnks for the quick answer, I'm sorry it took me so long to reply. Sadly your answer doesn't quit fix the problem, which is my fault as I wasn't precise enough. My Data looks like this:
Date | Space |
11.06.2018 | A |
12.06.2018 | B |
13.06.2018 | A |
13.06.2018 | A+C |
14.06.2018 | B |
14.06.2018 | C |
15.06.2018 | C |
16.06.2018 | |
17.06.2018 | A |
17.06.2018 | B |
17.06.2018 | C |
Now there are always three rooms available (A,B,C) but not always booked and I need to know how booked we actually are. My idea was to find this out, by replacing the date with a 3, the letter with a 1, take the sums and divide the values. This obviously means, that:
1. I need to remove the dates that are more often named then one (two or three times, I misused the word duplicate, sry!) but without deleting them as I need the information from the other column. Which is why I wanted to transform them into null values.
2. change the remaining date values to 3 (as in reallity those are way more, without addressing all of them single handly)
I hope this clarifys the issue, again I'm sorry if I wasn't precise enough and I hope you'll still be able to help out.
greetings, Nick
Hi @Nick2,
You could achieve this in Query Editor by the steps below.
1. Go to Query Editor and select the Date column and click Group By like below.
2. Then select Date and Count, click Unpivot Columns and you will get the values below;
3. Replace the value 2 to null and remove other columns.
4.Filer the values without 1.
5. Change Date type to Whole number.
For reference, you could have a look at my test file which has been attached below.
Best Regards,
Cherry
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
77 | |
60 | |
52 |
User | Count |
---|---|
165 | |
86 | |
68 | |
68 | |
58 |