Forum Discussion
Avivek
Post Partisan
4 years agoNeed help with the dax
Hello everyone! Recently I have created a report based on an excel which has few calculations. The calculations in the excel are as below: Sales Rep Expected Return Date Act Return Date Ac...
- 4 years ago
Add the Request ID field to the visual and you will see why the values are "different "
Avivek
Post Partisan
4 years agoPaulDBrown, it works only in few cases and doesn't work in most of the cases, one example is below
I
It should ne showing 60% but it shows 35.71%, can you suggest something else because i am unable to understand what is the error.
PaulDBrown
Community Champion
4 years agoWhat is the code for the % Late returns measure?
- Avivek4 years ago
Post Partisan
PaulDBrown Its same what you had shared
% Late Returns =IF(ISINSCOPE('Case Order Fact'[CREATED_NAME]),BLANK(),DIVIDE([Late return],[Correct return]+[Late return]))- PaulDBrown4 years ago
Community Champion
Can you change the last two measures in the image to the SUMX measures and post the screenshot?
Also, which table is the Sales Rep field in the visual coming from and which field are you using in the SUMX measures?- Avivek4 years ago
Post Partisan
PaulDBrown, i didn't follow, where are you asking me to use sumx.Are they for these measures:-
Late Return Temp =VAR _ReturnDate=IF(ISBLANK(MAX('Case Order Fact'[Act Return Date])),TODAY(),MAX('Case Order Fact'[Act Return Date]))VAR _Diff=DATEDIFF(MAX('Case Order Fact'[Expected Return Date]),_ReturnDate,DAY)RETURNSWITCH(TRUE(),ISBLANK(MAX('Case Order Fact'[Expected Return Date])),BLANK(),_Diff>0,1,0)Correct Return Temp =VAR _ReturnDate=IF(ISBLANK(MAX('Case Order Fact'[Act Return Date])),TODAY(),MAX('Case Order Fact'[Act Return Date]))VAR _Diff=DATEDIFF(MAX('Case Order Fact'[Expected Return Date]),_ReturnDate,DAY)RETURNSWITCH(TRUE(),ISBLANK(MAX('Case Order Fact'[Expected Return Date])),BLANK(),_Diff<0,1,0)Also all the columns that I am using are from the same table, earlier i had used sales rep alone from another sales hierarchy dim but now i brought in the same fact from where returnand returned dates are used.