Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am new to Dax so hopefully someone can point out what I am doing wrong.
I have a formula to count rows based on a slicer selection. This is setup as a measure.
The returned value is incorrect when using the "selectedCount" measure.
When using the measure and one count is returned the result is 0.05 but when I enter the value of 1 the correct value is retuned 0.27.
Try this way.
PercUTIL =
VAR DurationWorking =
DIVIDE (
MeetingRoomStats_20190523[Duration],
MeetingRoomStats_20190523[wrkingHours]
)
RETURN
DIVIDE ( DurationWorking, [SelectedCount] )
@Arjunarao wrote:Try this way.
PercUTIL =
VAR DurationWorking =
DIVIDE (
MeetingRoomStats_20190523[Duration],
MeetingRoomStats_20190523[wrkingHours]
)
RETURN
DIVIDE ( DurationWorking, [SelectedCount] )
This works but returns the same incorrect result. Although I like your formating much better then mine
HI @Sharpey ,
Can you please share some sample data to help us clarify your scenario?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Sure Sorry @Anonymous I was away
Duration - 467.50
PercUTIL - Measure calulation " PercUTIL = DIVIDE(DIVIDE(MeetingRoomStats_20190523[Duration],MeetingRoomStats_20190523[wrkingHours]),[SelectedCount])"
WrkingHours- 1736
SelectedCount - Measure Calculation "
SelectedCount = COUNTROWS(ALLSELECTED(MeetingRoomStats_20190523[RoomName]))"
RoomName = Room1
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 40 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 131 | |
| 105 | |
| 60 | |
| 56 | |
| 55 |