Forum Discussion
what if date is same
- 4 years ago
littlemojopuppy , have you created a messure called AssignedQTY and remove duplicates in that measure? If you simply sum up AssignedQTY, that won't remove the duplicates. To remove the duplicate, you need to
1. in the fact table, create a new column to calculate the number of times a name appearing on a specific day. If a name appear twice on the same day, column duplicate count will generate 2.
2. create a measure to make sure if a name appear more than once on the same day, the total QTY should be divided by duplicate count. Below is the table showing the correct QTY.
- Anonymous4 years ago
Hi Zaibsrule88
Please new a measure.
Total = VAR _table = SUMMARIZE ( 'Table', 'Table'[Code], 'Table'[Date], 'Table'[AvailableCap] ) VAR _total = SUMX ( _table, 'Table'[AvailableCap] ) RETURN _totalThe PBIX file is attached for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Correct me if I get you wrong. In your original table (e.g., fact_QTY ) duplicate recored are created because a new record is generated each time a user goes out or moves. To remove duplicate records, you can create a summary table as below.
fact_QTY_summarize=summarize(fact_QTY, fact_QTY[Date], fact_QTY[NameAssigned QTY])
- littlemojopuppy4 years agoCommunity Champion
Jeanxyz it's not a good idea to start creating tables to support individuial visualizations. Create a nice, clean star/snowflake design and write measures appropriately.
I'm also thinking there needs to be some thought about repeating ABC twice in the same day in a visualization.
- Zaibsrule884 years agoFrequent Visitor
Thank you for your help.
Correct , each time user goes out or move system creates a new record with new code with fixed QTY.
best way is count the duplicates, based on dates and devide the fixed Qty on Count.
Thank you