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

Dax - Creating a Measure

Hi, 

 

I am new to power BI and would like to know if anyone will be able to assist with the following query.

 

I have created a table which contains my financial items and my raw data actuals. However i was wondering whether i can create an actuals measure instead which will allocate all my data to the specific rows.

 

 

TableTablePanePane

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

We can create a calculate column and use the filter on this page to meet your requirement.

 

1. Create an actual column in Financial Category table.

 

Column = 
var _actual = 
CALCULATE(
    SUM('Transaction Table'[Actuals ]),
    FILTER('Transaction Table','Transaction Table'[Financial Statement Breakdown]='Financial Category'[financial statement list]))
return
IF(
    ISBLANK(_actual),0,_actual)

 

dax1.jpg

 

2. Then we can create a table visual and configure like this,

 

dax2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

Anonymous
Not applicable

See below Sample data. I have two tables in this model which i have created, however i have not created a relationship between the two tables! 

I have created a table in which then i have brought in the category and financial statement list from the Financial Category template. I would then like to create a measure which would then e.g. allocate the actuals results from the transaction table to the every specific row within the report linked to the Financial statement list . 

See below transaction table and Financial Category Template. In addition to report output  

Transaction Table

Financial Statement BreakdownProfit CentreMonthActuals 
Cash SalesGB69531/07/202024.81942
Total RevenueGB69531/07/202026.08325
Raw Mats GB69531/07/2020-15.56407
Pesonnel GB69531/07/2020-2.702
Other Direct Costs GB69531/07/2020-5.6985
Onerous Contract ProvisionGB69531/07/20200
Subcontract costs GB69531/07/20200
Depreciation GB69531/07/20200
OR DiscountGB69531/07/20201.64542
Settlement DiscountGB69531/07/202011
Segment IncomeGB69531/07/202018
SG&AGB69531/07/202021
Total Bad Debt GB69531/07/20202
UOP GB69531/07/202010
Field ContributionGB69531/07/20202
Cash SalesIE01631/07/202012.82202
Total RevenueIE01631/07/202021.82374
Raw Mats IE01631/07/2020-9.161192
Pesonnel IE01631/07/2020-11.05577
Other Direct Costs IE01631/07/2020-0.317719
Onerous Contract ProvisionIE01631/07/20200
Subcontract costs IE01631/07/20200
Depreciation IE01631/07/20200
OR DiscountIE01631/07/20200.026881
Settlement DiscountIE01631/07/20200.026881
Segment IncomeIE01631/07/20209
SG&AIE01631/07/20208
Total Bad Debt IE01631/07/20204
Field ContributionIE01631/07/202012
UOP IE01631/07/202020

 

Financial Category TemplateFinancial Category Template

 

Desired Report OutlookDesired Report Outlook

Hi @Anonymous ,

 

We can create a calculate column and use the filter on this page to meet your requirement.

 

1. Create an actual column in Financial Category table.

 

Column = 
var _actual = 
CALCULATE(
    SUM('Transaction Table'[Actuals ]),
    FILTER('Transaction Table','Transaction Table'[Financial Statement Breakdown]='Financial Category'[financial statement list]))
return
IF(
    ISBLANK(_actual),0,_actual)

 

dax1.jpg

 

2. Then we can create a table visual and configure like this,

 

dax2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

Anonymous
Not applicable

Many thanks for this 🙂 @v-zhenbw-msft  

 

Can you also please advise if its possible to freeze panes on a specific column within a Table in Power BI ? 

Hi @Anonymous ,

 

I'm afarid it is still impossible currently. This is a similar idea you can vote to impove Power BI.

 

Best regards,

 

Community Support Team _ zhenbw

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.

Top Solution Authors