Hi All,
I am using following dax to create a table --
Now rather then calculating Sum of the Incremental ACV i want to get that value of Incremental ACV which was entered on the latest date FOr example i want the value that is on 25 Mar 22 the last one. How can i get that in the above dax . Please help .
Thanks
Solved! Go to Solution.
Hey @amitchandak Final i resolved it . A small change need to be done
Rather using Sum inside calculate we have to use SELECTEDVALUE inside calculate just like this --
Result is now correct -
Actual Value -
Both are same now .
Thanks a lot for helping me
@Amar-Agnihotri , Try measure like
calculate(suxm(Table, lastnonbalnkvalue(Table[Close_date_c], SUM ( 'Opportunity Snapshot'[Incremental ACV (USD)] ) ) ), allexcept(Table, Table[Opportunity ID]))
or
calculate(suxm(Table, lastnonbalnkvalue(Table[Close_date_c], SUM ( 'Opportunity Snapshot'[Incremental ACV (USD)] ) ) ), filter(allselected(Table), Table[Opportunity ID] = max(Table[Opportunity ID]) ))
Thanks @amitchandak for the reply but i think that would not work because There are many opportunity ids there in Snapshot table and I have to get the last value for each opportunity Id. The snap that i posted is just a demo snap for a single opportunity ID . You can see here . In this demo data i have taken two opportunities with different color. Now i want to pick the last ACV value for both the opportunites in the iteration.
@Amar-Agnihotri , The above should work
Measure =
VAR __id = MAX ('Table'[Opportunity ID] )
VAR __date = CALCULATE ( MAX('Table'[Close_date_c] ), ALLSELECTED ('Table' ), 'Table'[Opportunity ID] = __id )
CALCULATE ( SUM ( 'Opportunity Snapshot'[Incremental ACV (USD)] ), VALUES ('Table'[Opportunity ID] ),'Table'[Opportunity ID] = __id,'Table'[Close_date_c] = __date )
or
Measure =
VAR __id = MAX ('Table'[Opportunity ID] )
VAR __date = CALCULATE ( MAX('Table'[Close_date_c] ), ALLSELECTED ('Table' ), 'Table'[Opportunity ID] = __id )
Sumx ( VALUES ('Table'[Opportunity ID] ), CALCULATE ( SUM ( 'Opportunity Snapshot'[Incremental ACV (USD)] ), VALUES ('Table'[Opportunity ID] ),'Table'[Opportunity ID] = __id,'Table'[Close_date_c] = __date ) )
Hi @amitchandak
I created this measure --
Actual Value -
I haven't check the second measure.. Let me check that also
Hey @amitchandak Final i resolved it . A small change need to be done
Rather using Sum inside calculate we have to use SELECTEDVALUE inside calculate just like this --
Result is now correct -
Actual Value -
Both are same now .
Thanks a lot for helping me
User | Count |
---|---|
215 | |
81 | |
74 | |
71 | |
50 |
User | Count |
---|---|
184 | |
93 | |
83 | |
75 | |
74 |