The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey
I'm investigating apartment and parking slot sales. I need to calculate how many apartment sales will be bought with a parking slot.
1 Housing Company have parking slots and apartments.
1 apartment sale can be bought by multiple customers.
There is scenario that 1 apartment is sold with 1 parking slot to 2 customers but only 1 customer from these 2 customers bought the the parking slot. In this case the apartment is sold with parking slot.
The desired result would be like:
Apartment 1 Bought with parking slot
Apartment 2 Bought with parking slot
Apartment 3 Not bought with parking slot
After that I could make a analysis with different Housing companies with % of housing purchases with parking slot.
File:
https://www.dropbox.com/s/t1y9rx45s3z950v/Test.pbix?dl=0
Any ideas?
So like this?
Measure =
VAR __All = COUNTROWS(FILTER('Items',[Type]<>"Parking Slot"))
VAR __ParkingSlots = COUNTROWS(FILTER('Items',[Type]="Parking Slot"))
RETURN
__ParkingSlots / __All
PBIX is attached.
Hi
Thank you for your reply @Greg_Deckler . This is still not enough.
There can be a multiple bueyrs for apartment and the measure needs to be calculated per one apartment. So if there is 3 buyers for the apartment x and one of them buy one parking slot from the same housing company, the dax should say that the apartment was sold with parking slot.
I tried to make a dax but it does not work.
link:
User | Count |
---|---|
78 | |
77 | |
37 | |
33 | |
31 |
User | Count |
---|---|
92 | |
81 | |
58 | |
48 | |
48 |