How do I get the latest value from a measure? - powerbi

I have a measure which is the sum of 2 other columns. How do I take the latest value of that measure? is it possible? I've seen examples but it seems you can only do it if it's a column.
thanks!
Erik

Related

Having trouble getting a cumulative saving measure for a plot in PowerBi

As the title says, I can't sum [savings] cumulatively. My total savings measure only plots monthly saving not cumulative. Any help with the Dax for the measure would be greatly appreciated, I've tried a lot of solutions online to no avail.
Cheers
Power BI has a Quick Measure "Running Total" that is provided for exactly this purpose. Make sure you have a separate Date table and use that in the Field section.

Powerbi Matrix issues with the value field

I have a problem with Powerbi I can't seem to fix. If the answer is obvious i am sorry but i am just starting out with Powerbi.
We are trying to make a dashboard that will show if a coworker is available or not based on a code 1 -3).
We check their availability per ISOWeek. If they don't have work that week they get code 1, when they have work code 2 etc.
These codes show up the right way in SQL but when I want to add them in my matrix table and have the coworker names on the rows, the ISOWeek on the columns and then when i add the Code in values Powerbi wants to show the total, total(distinct), first or last.
The problem is it wont use the code it got per isoweek. Is there a solution for this?
Thanks in advance!
What is should look like in the matrix:
Fixed it by giving the columns: don't Summarize on the modeling tab. Then I gave the code column the minimum value for each week.

Division in PowerBI

So my question is, how can divide figures in one column to a specific "cell". I am sure that there is a dax formula that can do this just not sure which. Please help.
Thanks.
Here are some articles describing how to calculate subtotals values with DAX in PBI.
https://powerpivotpro.com/2013/07/writing-a-subtotal-calc-column-aka-the-simplest-use-of-the-earlier-function/
https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/

Power BI/DAX using parameters

I'm a bit new to the DAX/Power BI, so i dont have broad understanding of it.
I have table 'Sales' as follows:
ItemID SalesValue Amount actionSales Date
1 0.5 2 0 2018-02-18
1 0.3 5 1 2018-02-18
1 0.5 6 0 2018-02-19
-I left out some fileds as description, brand, etc...
-actionSales field is a bit, that represent if sold item was on a discount.
I have made few measures that have total salesValue, total salesValueOnActionSales, percentOfActionSales, etc...
Within visuals in Power BI I can filter values if they are greater or lower then some value.
Then i figured that it would be nice to show only items that have share of action sales greater then 'parameter' (Parametr is a whole number, and it is in visual with a slider) that I made on a report.
After some time, I'm no closer to a solution. Can this be made? if it can, can someone please point me to a direction on how to do this or share some insights on the matter.
Cheers
This can be done with the 'What If' parameter in PowerBI. In short: you define a parameter, connect it to a slicer and use the parameter in a measure.
Link to MSDN Docs
Can you not add the actionSales column to a slicer and select Greater than or equal to from the options?
If this doesn't work let me know and I have another solution that might do it.

How to sum measures per group in PowerBI

Here's the edited version:
I have this sample table using powerbi where %Currnt is a measure and the rest is column. I also have filters where i just selected area=asia and salesoffice=australia and fyear =2018. I have to sum up %currnt column(measure) and place it under ExpectedResult column.
But as you can see in my current resultset, when i sum the %Current seems like its it returns its average (0.485) rather than the sum (0.97). I need to get the sum of the %currnt first. My expected result is 0.97 per row
Does anyone of you encounter the same problem? Let me know if you find any solution. Appreciate your help. Thanks
FYear FMonth CurrentAR TotalAR CountFY %Currnt ExpectedResult**
2018 August, 2018 18,000.00 25,000.00 2 0.72 0.97
2018 July, 2018 33,000.00 130,000.00 2 0.25 0.97
**0.485**
not sure I have understand your problem, but you have to consider that, in DAX, when creating a measure, the context of the query is everything.
I mean that if you create a measure to count or calculate something, DAX apply it the current context of the data, ie if you apply filters, these filter is applied to the context. So maybe, you should consider create measure that is context free for the calculation of the MAX CountFY column using CALCULATION DAX formula.
Let me know if this helps. If you want to go further can you post and sample data to investigate deeper on your problem?