New Enterprise DNA Initiatives

Remove Rows from Table but Count the Total Measure

Hi,

I have a Total Calculation that I cannot get to work and I am looking for some help.

This Gives me a Daily Stock Level for each Product @ Each Branch

Daily Stock =
VAR MaxDate =
MAX ( ‘Calendar’[Date])
VAR MaxStockDates =
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( FactStock, Products[ProductID]),
@MaxStockDate”, CALCULATE ( MAX ( FactStock[In/Out Date] ) )
),
‘Calendar’[Date] <= MaxDate
)
VAR MaxStockDatesWithLineage =
TREATAS ( MaxStockDates, Products[ProductID], ‘Calendar’[Date] )
VAR Result =
CALCULATE ( SUM( FactStock[Stock On Hand] ), MaxStockDatesWithLineage)
RETURN
Result

I then want to get the Product Total for All Branches

This works fine until I add the Supplier to the Canvas and I then have the Table in the Screenshot.

What I would actually want is 1 Line for each day that shows Airlink with the 2 and then Daily Stock Total should be the SUM of the other Suppliers and the Suppliers should not be on the Canvas as they do not sell at that Branch.

I can see that all Sales at all Branches are showing against the Other Supplier but how do I stop them from being displayed.

Any help gratefully received.

Thanks

Chris

hi @chris.turnbull,
it would help if you upload the power bi file along with expect results so all of us can see what its going on.

thanks
Keith

Hi @chris.turnbull, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.
    image
  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

Hi @chris.turnbull , we’ve noticed that no response has been received from you since the 24th of December. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

Thanks to the contributors of this post. Due to the length by which this post has been active, we are tagging it as Solved. For further questions related to this post, please make a new thread.