Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello
I have some data, where I want to retrieve the max value from an unpivoted column. I need to retrieve the max value for each "name". I have multiple record for each name, on different dates. What I want to get is the nmax value for each name.
I have tried the following:
Max value =
VAR myValue = [Value at recent date]
RETURN
CALCULATE(
Values('inStock'[ActualStart]);
FILTER(
ALLSELECTED('inStock'[ActualStart]);
CALCULATE(SUM('inStock'[Value]))=myValue))However, when trying to display the data the following fault appears:
This is no matter which visual I try to represent it in. Is there any way to make this happen?
It looks somewhat like this:
name date attribute value
xx 9/10-2016 hgr 3
xx 20/11-2016 hgr 5
sdf --- we 1
Where attribute and value are the unpivoted ccloumns
Value at recent date =
CALCULATE(
SUM('inStock'[Value]);
FILTER('inStock';'inStock'[ActualStart] = MAX('inStock'[ActualStart])))I have recently tried this for retrieving the latest data. I tried changing the "ActualStart" to Value. Then I tried to add another FILTER before the SUM funciton, to divide the values into dates. However this is not allowed
If your requirement is finding max value, MaximumVal = MAX('inStock'[Value]) - this will give expected outcome.
Was I understood wrong?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |