Forum Discussion
How to recode revenue from reporting code ?
Hi, Anonymous
According to your picture, I can’t determine which column you want to recode, so I write DAX for both column, you can take a look:
For [C/D]:
C/D1 = IF( [Reporting Code]>=6&&[Reporting Code]<=10, "Revenue", CONVERT([C/D],STRING))This is the result:
For Reporting Code1:
Reporting Code1 = IF( [Reporting Code]>=6&&[Reporting Code]<=10, "Revenue", CONVERT([Reporting Code],STRING))This is the result:
And you can choose the expected result from one of these
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- mohammedadnantImpactful Individual
Hi Anonymous
Good day,
Create a new manual table 1=a value, 2=b value likt this 6=Revenue, 7=Revenue etc.. and make relationship with this table, hope this will help you to get the desired result.
Thanks & Regards,
Mohammed Adnan
- AnonymousNot applicable
Hi Moha
Thank you for your sharing by using PQ.
But In my actual application , i have runnning number , for example :-
1 till 99 = revenue
99 till 200 = expense
So i need to use DAX script.
Paul Yeo
- v-robertq-msftCommunity Support
Hi, Anonymous
According to your picture, I can’t determine which column you want to recode, so I write DAX for both column, you can take a look:
For [C/D]:
C/D1 = IF( [Reporting Code]>=6&&[Reporting Code]<=10, "Revenue", CONVERT([C/D],STRING))This is the result:
For Reporting Code1:
Reporting Code1 = IF( [Reporting Code]>=6&&[Reporting Code]<=10, "Revenue", CONVERT([Reporting Code],STRING))This is the result:
And you can choose the expected result from one of these
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.