Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello Friends,
I want to get specific values from the existing column to new column .Is it possible with like or search condition in Dax.
Let's say in the below table i want only *Target values from the Name column like Target Values column as mentioned .
Name Value Target values
A Metric 1
B Target 1 B Target
C Target 1 C Target'
C Metric 1
AA Metric 1
AA Target 1 AA Target
DD 1
FF 1
G Target 1 G Target
If it's possible kindly let me know.
Thanks in advance
Solved! Go to Solution.
As a Calc Column, try this
=if(search("Target",[Name],1,0)>0,[Name])
Hi Harib,
I would suggest the easiest way to do this is in the query editor rather than DAX. But the post below has a solution that explains how to do it in both:
Hope that helps!
Matt
@harib depends on what you trying to do, you can do stuff in dax and power query
in dax there is
or a simple new column;
https://docs.microsoft.com/en-us/dax/search-function-dax
https://docs.microsoft.com/en-us/dax/find-function-dax
these just find po
they return the position of what you looking for...
what would be the condition of the copy?
also fairly simple to do in power query in a conditional or custom column, why would you do it in dax? is it for the user to do something or is it part of your data transformations?
Proud to be a Super User!
As a Calc Column, try this
=if(search("Target",[Name],1,0)>0,[Name])
Hi, I have two Data sets as below.
Table 1:
Product | YTD1 | YTD2 | YTD3 | Total |
A | 10 | 15 | 12 | 37 |
B | 5 | 2 | 1 | 8 |
C | 6 | 1 | 3 | 10 |
Total | 55 |
Table 2:
Month | YTD |
Jan | YTD1 |
Feb | YTD2 |
Mar | YTD3 |
I want to create a NewColumn (or maybe a new measure) in Table 1 which is dependent on a Slicer (value: Jan, Feb, Mar) in the Report.
For example, if filtered value is "Jan" in the slicer, the NewColumn will get YTD1 column, if "Feb", then it will get YTD2 column.
What is the way to do this?
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |