Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Team,
I have played with my data set so I could manipulate the Matrix view a bit more.
I have unpivot a table using two columns so now i have got :
Column "Category" where I have job count and revenue as attribute
Column "Value" where I have got the count of jobs and revenue falling under one but easily differentiated due to column "category"
It works like a treat and I can select if I want to see all or a specific attribute now. The only thing is that revenue should be fornatted as $ but not job count. Is there a formula for me to use that will allow based column Category to format my value on conditions and leaving the value numerical?
Thanks.
Solved! Go to Solution.
Seems like it should be along the lines of:
Column = IF([Attribute] = "REVENUE",CONVERT([Value,CURRENCY),[Value])
Hi @corange
you can use the convert function
https://docs.microsoft.com/en-us/dax/convert-function-dax
Do you guys know what we will be the trick to add this as a column instead of a measure?
FORMAT is going to make those values text, I thought you wanted to keep them numeric?
Hi,
Well when I tried it it didnt change to text, it kept it as numerical:
I have run few check and the table on the right has been created with the formula mentionned above and it is correct. There are two things I dont know how to solve though:
1) Add a delimeter " , " as per the left example
2) When I drag and drop my measure into my matrix which as Month & Period in Drill down, the entire calendar I use for my model appears. When I select date range, only data for the date range appear but the rest of the month doesnt dissapear as it will normally do.
I hope I am making sense for point 2.
Thank you
I hope the second point make sense.
Hi @Greg_Deckler ,
Thanks for pointing this out. I see it now.
Any idea how I would be able to use CONVERT() and obtain the same results? How write something around those lines using CONVERT():
IF ATTRIBUTE = REVENUE THEN VALUE = CURRENCY, ELSE VALUE = "" meaning not symbol.
Thank you
Seems like it should be along the lines of:
Column = IF([Attribute] = "REVENUE",CONVERT([Value,CURRENCY),[Value])
@Mariusz - Good call, I must have missed the introduction of that DAX function!
It's been introduced only a few months back, but it's solving the problems we all had with FORMAT in this king of scenarios.
Thanks
Mariusz
Hi,
I dont get it. I dont have an issue with FORMAT in that formula and my results are adding and not being transform as Text.
If I were to use your solution, how will it be written in a DAX Formula? The formula needs to be based on one column where we know if it is either a revenue or a job count, then use another column where I store the value and determine if Column 1 says Revenue then $ else Job Count "".
Thanks.
Hi @Greg_Deckler ,
i have found this one and it does work. However, I dont know how to make it respond to the other filter I have got in slicer. For example when I select data range March to April and drop this measure in, it will expand and show me for the entire FY I have got in store.
Any idea?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |