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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MrMP
Helper III
Helper III

Totals for year showing wrong value

Hi All,

 

I have a table below: (these are all measures)

1. First field is coming from balance sheet and as you can see has values for quarters and year is the amount in the last quarter.

2. Second field coming from PnL and has values for all quaters where year is summation of all quarters

3. Result column is Balance Sheet Field + PnL Field. As you can see for quarters it works fine, but I cant calculate the total. It has to be also 1.533.088.

MrMP_1-1668721917761.png

 

Hope you can help community! 🙂

 

Thank you!

 

 

7 REPLIES 7
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @MrMP 

 

In your initial request you highlighted the bottom right total to be wrong. But based on this feedback also the middle total must be wrong from the beginning because it seems to be a running total.

 

If that is correct, than PnL formula should need to be fixed upfront. But on the other side if column PnL is a running total then you already have the total in Row Number 4.

 

So from my understanding the easiest and most logical thing to do here is to turn of the total.

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Mikelytics
Resident Rockstar
Resident Rockstar

HI @MrMP ,

 

Can you please share the measures you use for the columns?

 

Best regards

Michael

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

1. Balance Sheet Field - 

VAR lastquarter = MAX('Calendar'[Quarter Number])
VAR lastyear = MAX('Calendar'[Year])
RETURN
SWITCH(TRUE(),
ISINSCOPE('Calendar'[Quarter Number]), Sum(Balance Sheet Field),
ISINSCOPE('Calendar'[Year]),  CALCULATE(Sum(Balance Sheet Field)), FILTER('Calendar','Calendar'[Quarter Number]=lastquarter && 'Calendar'[Year]=lastyear)))

2. PnL Field - 

SWITCH(TRUE(),
ISINSCOPE('Calendar'[Quarter Number]),Sum(Revenue Field) ,
ISINSCOPE('Calendar'[Year]),SUMX(SUMMARIZE('Calendar','Calendar'[Year],'Calendar'[Quarter Number]),sum(Revenue Field) ), 
SUMX(SUMMARIZE('Calendar','Calendar'[Year],'Calendar'[Quarter Number]),sum(Revenue Field) ))

 

Lowest granularity of the calendar is Quarter.

 

Thank you!!!

Hi @MrMP 

 

Can you please try to build a third measure like the following?

 

Result =
SUMX(
   VALUES('Calendar'[Quarter Number]),
   [PnL Field] + [Balance Sheet Field]
)

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

@Mikelytics wrong total again. Any other ideas?

 

MrMP_0-1668865466335.png

 

@MrMP 

 

ok, I think I know why, 

 

Please try the following

 

 

Result =

[Balance Sheet Field]

+

SUMX(
   VALUES('Calendar'[Quarter Number]),
   [PnL Field]
)

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

MrMP_0-1668867968634.png

 

This total of 2.831.269 should be the same like Q4 of the year. So 1.533.088.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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