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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Kosenurm
Regular Visitor

Most popular from Dataverse

Hi there, 

 

I have a desk booking app, and the desks which have been booked are in a Dataverse table column. 

 

I want to show a simple data card which counts the amount of times each individual desk reference appears in this column, and only shows the top result (the one with the most bookings). 

 

Any ideas how I can do this?

 

Thanks

K.

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Kosenurm 

Step1: connect to dataverse in Power BI Desktop,

vxiaotang_0-1643259672598.png

Connect to Dataverse from Power BI Desktop

 

Step2: After get data from dataverse, create measures like bellow( I create a sample for your reference, see file attached bellow)

count = COUNT('Table'[desk])
MaxCount =
VAR _count =
    MAXX ( 'Table', [count] )
VAR _name =
    CALCULATE ( MAX ( 'Table'[desk] ), FILTER ( 'Table', [count] = _count ) )
RETURN
    _name & UNICHAR ( 10 ) & _count

vxiaotang_1-1643264616173.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Kosenurm
Regular Visitor

Thanks, but when I do this, I get this error message - any ideas?

 

 

Error Message:
OLE DB or ODBC error: [DataSource.Error] Microsoft SQL: Input query length exceeding the supported maximum length.

v-xiaotang
Community Support
Community Support

Hi @Kosenurm 

Step1: connect to dataverse in Power BI Desktop,

vxiaotang_0-1643259672598.png

Connect to Dataverse from Power BI Desktop

 

Step2: After get data from dataverse, create measures like bellow( I create a sample for your reference, see file attached bellow)

count = COUNT('Table'[desk])
MaxCount =
VAR _count =
    MAXX ( 'Table', [count] )
VAR _name =
    CALCULATE ( MAX ( 'Table'[desk] ), FILTER ( 'Table', [count] = _count ) )
RETURN
    _name & UNICHAR ( 10 ) & _count

vxiaotang_1-1643264616173.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors