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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NMOORE
Helper II
Helper II

Power Apps Power BI Integration Distinct Count

Hi all,

In Power Apps, I want to do a distinct count of values from a column which is coming in through Power BI integration (Power BI Integration is up and working well). So far I have been using this to take the first section:

 

First(PowerBIIntegration.Data).Section

 

It would be using the same item as above, but where the table shows the below I just need the answer to be 2:

 

Section 

1.1.2.4 

1.1.2.4

1.1.2.4

1.1.1.1

1.1.1.1

 

Many thanks for any help,

Nick

1 ACCEPTED SOLUTION
AmiraBedh
Super User
Super User

First, ensure you are accessing the full dataset from Power BI. Since `First(PowerBIIntegration.Data)` only gets the first record, you should use `PowerBIIntegration.Data` to access the entire dataset.

Use the `Distinct()` function to create a table of distinct values from the 'Section' column. The syntax will be something like `Distinct(PowerBIIntegration.Data, Section)`.

Finally, use the `CountRows()` function to count the number of rows in the distinct table you created. The final formula will look like `CountRows(Distinct(PowerBIIntegration.Data, Section))`.

 

CountRows(Distinct(PowerBIIntegration.Data, Section))

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

3 REPLIES 3
AmiraBedh
Super User
Super User

First, ensure you are accessing the full dataset from Power BI. Since `First(PowerBIIntegration.Data)` only gets the first record, you should use `PowerBIIntegration.Data` to access the entire dataset.

Use the `Distinct()` function to create a table of distinct values from the 'Section' column. The syntax will be something like `Distinct(PowerBIIntegration.Data, Section)`.

Finally, use the `CountRows()` function to count the number of rows in the distinct table you created. The final formula will look like `CountRows(Distinct(PowerBIIntegration.Data, Section))`.

 

CountRows(Distinct(PowerBIIntegration.Data, Section))

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Thanks alot for your reply. I should have explained it better. The First function was correct in the previous excersise, I was just using it as an example. I just tried yours and it works perfectly, I was trying to put .Section in rather than , - as  I assumed that's the way it had to be. Great, thanks

I am glad to help 🙂


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors