Forum Discussion
kincaids
9 years agoHelper II
percentages and multiple query columns
I'm new to Power BI and having a difficulty applying what I'm learning through the hours of tutorials to my particular situation, so your help is greatly appreciated. Our company rents instrument...
kincaids
9 years agoHelper II
Ok, I think I'm starting to figure some of this out on my own, but still need help. I think what I needed to do was take your
% Owners = CALCULATE(COUNTROWS('Rental Accounts - scrental'),'Rental Accounts - scrental'[rnt_dunn]="X")/COUNTROWS(ALL('Rental Accounts - scrental'))and change it to
Owned = CALCULATE(COUNTROWS('Rental Accounts - scrental'),'Rental Accounts - scrental'[rnt_dunn]="X")I want to do the same with the "% Renters" formula, but I realized I made a slight mistake. How would I make the formula say that Renters are all that have 'null' as a return date and a 'P' OR AN 'N' in the "rnt_dunn" column? I've tried a few different things, but I can't seem to get the syntax correct.
This has been a great exercise for me...learning a lot!
Greg_Deckler
9 years agoCommunity Champion
I believe it would either be:
% Renting = CALCULATE(COUNTROWS(Renters),Renters[Return Date]=BLANK(),Renters[rnt_dunn]="P" || Renters[rnt_dunn]="N")/COUNTROWS(ALL(Renters))
or
% Renting = CALCULATE(COUNTROWS(Renters),Renters[Return Date]=BLANK(),Renters[rnt_dunn]="P" | Renters[rnt_dunn]="N")/COUNTROWS(ALL(Renters))