Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
JemmaD
Helper V
Helper V

Create measure which shows total AND a category

Hi there,

 

I have a table of data showing clients, and total number of meetings with those clients each day. 

My report consumer wants to see if the meetings on that day were virtual or face to face.

There is a Meeting Type field in my data which has these values.

 

So in each cell for each day, I want to show for example 1 virtual 1 face to face if there are two meetings on that day of both types, or 2 virtual if there are two virtual meetings for that day.

 

Example below:

 

I've gotten half way with the following measure, however it's not working correctly and only displays when there is one meeting of 1 type on a given day. I need it to show all meetings and each meeting type:

 

 

 = [Meetings Count] &" "& SELECTEDVALUE('MEETINGS'[Meeting Type])

 

 

Is there a way for me to achieve this? Example below:

JemmaD_1-1696593153024.png

 

1 ACCEPTED SOLUTION
mh2587
Super User
Super User

Meeting Summary = 
VAR VirtualCount = CALCULATE(
    COUNTROWS(YourTable),
    FILTER(YourTable, [Meeting Type] = "Virtual")
)

VAR FaceToFaceCount = CALCULATE(
    COUNTROWS(YourTable),
    FILTER(YourTable, [Meeting Type] = "Face to Face")
)

RETURN
IF(
    VirtualCount > 0 && FaceToFaceCount > 0,
    VirtualCount & " virtual " & FaceToFaceCount & " face to face",
    IF(
        VirtualCount > 0,
        VirtualCount & " virtual",
        IF(
            FaceToFaceCount > 0,
            FaceToFaceCount & " face to face",
            BLANK()
        )
    )
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



View solution in original post

2 REPLIES 2
mh2587
Super User
Super User

Meeting Summary = 
VAR VirtualCount = CALCULATE(
    COUNTROWS(YourTable),
    FILTER(YourTable, [Meeting Type] = "Virtual")
)

VAR FaceToFaceCount = CALCULATE(
    COUNTROWS(YourTable),
    FILTER(YourTable, [Meeting Type] = "Face to Face")
)

RETURN
IF(
    VirtualCount > 0 && FaceToFaceCount > 0,
    VirtualCount & " virtual " & FaceToFaceCount & " face to face",
    IF(
        VirtualCount > 0,
        VirtualCount & " virtual",
        IF(
            FaceToFaceCount > 0,
            FaceToFaceCount & " face to face",
            BLANK()
        )
    )
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



@mh2587 excellent this is perfect thank you so much!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.