Forum Discussion
Anonymous
6 years agoNot applicable
Relationship issue with Measure
Hi Experts I have been looking at this problem for 3 days and cannot see why my table to the right does not show the same p-value for each of the month periods. Scenario If you select product id ...
- 6 years ago
New Table
My Table = VAR OuterComplaints = COUNTROWS ( PMS_COMPLAINT ) RETURN ADDCOLUMNS ( VALUES ( PMS_FINANCIAL_PDS[Month Start] ), "CountComplaints", CALCULATE ( COUNTROWS ( PMS_COMPLAINT ) ), "Index", RANKX ( PMS_FINANCIAL_PDS, PMS_FINANCIAL_PDS[Month Start],,, DENSE ), "Outer Complaints", OuterComplaints )Something along these lines...
freder1ck
6 years agoKudo Kingpin
Haven't been able to look at this a whole lot the past couple of days. The problem of a wrong value in a total is generally the result of evaluating a measure with no filters. The fix is either to do a SUMX of the measure over the distinct months, or to have an IF statement that evaluates the measure differently if there are no filters.
Anonymous
6 years agoNot applicable
hi Freder1ck
firstly many thanks, i believe the answer lies with the following measure.
__s = VAR Mytable1 = ADDCOLUMNS(VALUES(PMS_FINANCIAL_PDS[Month Start]),"CountComplaints",CALCULATE(COUNTROWS(PMS_COMPLAINT)),"Index",RANKX(PMS_FINANCIAL_PDS,PMS_FINANCIAL_PDS[Month Start],,,Dense))
RETURN
SUMX(Mytable1,
SUMX(Mytable1,
IF([Index]>EARLIER([Index])&&[CountComplaints]<EARLIER([CountComplaints]), 1,
IF([Index]>EARLIER([Index])&&[CountComplaints]>EARLIER([CountComplaints]), -1))
)
)