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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Code an expression on Power Bi Report Builder

I have a model on Power Bi desktop where I calculate closed accounts with DAX in the following way :

Closed Accounts:=CALCULATE(CALCULATE(COUNTA('Accounts and Balances'[Close Date]),
USERELATIONSHIP('Accounts and Balances'[Close Date],'Calendar'[Date])),FILTER('Calendar',[Date]<TODAY()))

I have imported exactly the same datasets in Power Bi Report Builder and I am trying to calculate Closed Accounts by using an expression.  Do you please know how I can do that?

2 REPLIES 2
Anonymous
Not applicable

I have a Power Bi Desktop model with the following measure formula in DAX :

 

Closed Accounts:=CALCULATE(CALCULATE(COUNTA('Accounts and Balances'[Close Date]),
USERELATIONSHIP('Accounts and Balances'[Close Date],'Calendar'[Date])),FILTER('Calendar',[Date]<TODAY())).

 

How can I write the same formula as an expression in Power Bi Report Builder?

 

I have brought exaclty the same dataset in Power-Bi Report Builder.

v-danhe-msft
Employee
Employee

Hi @Anonymous ,

Could you please offer your sample data to have a test? And what is your desired result? Where would you like to show the data, in a table or a card? 

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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