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
jagus
Regular Visitor

Simple.....?...DAX Question

Hello,

I am publishing a paginated report connecting to Power BI dataset. The dataset looks like this:

jagus_4-1625631537559.png

 

 

Transactions are recorded for March, Feb, and Jan 2021 and the requirements are next. 

 

 

  1. The first requirement is to get the current month's balance for all accounts that are not 55500 nor 888000.
  2. The second requirement is that for the account 55500 the balance is the current YTD. 
  3. The third requirement is to get the balance of the all other accounts times -1 to balance zero when all balances are added.

#1 and #2 are straightforward, 

 

EVALUATE
SUMMARIZECOLUMNS
         (

                    group6, group7, group8, group9,
                    dept, subdept, account,
                     "TotBal", CALCULATE(SUM('table'[tranval]),
                                 'table'[account]<>"55500" && 'table'[account]<>"88800"),
                    "Tot55500", CALCULATE(SUM('table'[tranval])),
                                 FILTER(VALUES('table'[tranval]),'table'[account]="55500"),
                                 FILTER(VALUES( 'table'[trandate]), YEAR('table'[trandate]) = YEAR(datevalue("3/1/2021")))                     
              )

 

jagus_6-1625632154739.png

 

#3 just cannot figure it out. How to get AdjBal?

 

As you can see, the balance for account 88800 should be the value to zero out the aggregation of all other balances (440-75+50) = 220 * (-1) = -415

 

Any ideas are greatly appreciated.

 

Thanks,

Antonio

 

 

 

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @jagus 

Have you solved your problem? If yes, kindly accept the answer helpful as the solution(OR kindly share your solution😁). so the others can find it more quickly.

Or

if problem still persists, please let me know.

 

 

Best Regards,

Community Support Team _ Tang

v-xiaotang
Community Support
Community Support

Hi @jagus 

it's impossible to continue generating the column AdjBal in that function. so we can only recreate the column AdjBal  later.

for example,

vxiaotang_0-1625811630424.png

OR
could you share your sample data or sample file after removing sensitive information? so that we can work on it further.

Any question, please let me know.

 

 

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
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
Top Kudoed Authors