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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Cyriackpazhe
Helper II
Helper II

expanded table

Calculate ( countrows( Regions), Sales)) . Here Regions is part of the expanded table of Sales. Can someone explain how the table "Sales" as calculate argument is used to evaluate the expression. The Regions[Regions] column part of the expanded "sales" table.

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi ,

Based on the information, the countrows(Regions) function counts the number of rows in the Regions table. Because CALCULATE adjusts the filter context using the Sales table, only those Regions that are linked to the current set of rows in Sales are considered.

vjiewumsft_0-1739524428772.png

vjiewumsft_1-1739524435654.png

Using the DAX formula.

vjiewumsft_2-1739524461068.png

 

You can view the following documents to learn more information.

CALCULATE function (DAX) - DAX | Microsoft Learn

COUNTROWS function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

View solution in original post

2 REPLIES 2
v-jiewu-msft
Community Support
Community Support

Hi ,

Based on the information, the countrows(Regions) function counts the number of rows in the Regions table. Because CALCULATE adjusts the filter context using the Sales table, only those Regions that are linked to the current set of rows in Sales are considered.

vjiewumsft_0-1739524428772.png

vjiewumsft_1-1739524435654.png

Using the DAX formula.

vjiewumsft_2-1739524461068.png

 

You can view the following documents to learn more information.

CALCULATE function (DAX) - DAX | Microsoft Learn

COUNTROWS function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

some_bih
Super User
Super User

@Cyriackpazhe in Power BI with Star schema model, Sales table is fact table and via relationships other tables are expaned table of Sales, some of details on link.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.