Forum Discussion
Many-to-many dimension - blank row behavior
I don't think so. In my data, the measure (price in your example) is linked only to a warehouse task, not to the combination of warehouse task and service code. I think that if I implement your solution, I would double count those cases where a warehouse task has more than 1 service code.
Yes but that would be as well a facts table, (WarehouseTasks) and woul make a distinctcount and create measures on top of that distinctcount measure.
If you want, you could share you pbi file and i could provide an example
- BartVW4 years ago
Helper I
Thanks. I can try and prepare a mockup pbix with my scenario. But before I do: will your solution also work for those cases where there is no service code at all? Would that introduce records with a blank key in the fact table? And is it really best practice in power bi to handle this through a measure (it cannot be distinct count as I need to be able to sum up the quantities)?
- Anonymous4 years agoNot applicable
I dont entierly know your model so i cant say it will not show the blank row, but a 1-many relationship will help you debug better, and if the row apears you will find why it does easyer.
To you other question, it depends on what you want to sum.
In the model i presented you can:
count the number of warehouses by Countrows('Warehouses')
Count distinct services by Countrows('Services')
Count nr of warehouse services by Countrows('facts')
Sum all entrys of your measure by Sum('facts'[measure])
Hope it helps