Forum Discussion
Pivot (Matrix) and Visual based on two Bins/Bucket columns
- Anonymous4 years ago
Hi androo ,
Here I create a sample by data in Excel to have a test.
Here I inactive both relationships from [Bin Tag] to [Bin1] and [Bin2].
Measure:
Bin1 count = CALCULATE(DISTINCTCOUNT('Table'[ID]),USERELATIONSHIP('Table'[Bin1],Bin[Bin Tag]),'Table'[Bin1]<>BLANK())Bin2 count = CALCULATE(DISTINCTCOUNT('Table'[ID]),USERELATIONSHIP('Table'[Bin2],Bin[Bin Tag]),'Table'[Bin2]<>BLANK())Bin2 count based on Bin1 = CALCULATE([Bin1 count],'Table'[Bin2]<>BLANK())Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 4 years ago
hi Rico,
I thought the answer would be measures, and, thanks, yes it seems it is. A bit of a pain as it means I have to write two long measures creating the ten or so bins I need rather than using the PBi built in grouping directly, but, it works and means I can then use slicers from my category data with the visual and get sense. So, thanks. I've uploaded a version of my example file, in PBi fixed and with some superfluous elements removed so that the solution is as clear as possible.
Oh, I did come across a Row Level Security problem in the past where I wanted to use "userelationship" but, apparently, in that scenario you can't. So that somwhat put that option out of my mind. But, it seems that it is a way to have two relationships, I'm presuming that at least one of them has to marked as inactive (although both are here) at least for limited purposes, from one table to another, that becomes a use case for the "use relationship" function.