The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello everyone,
I want to create a new table with DAX from an existing table according to a specific condition like below SQL:
select distinct col1 ,col2, col3 from Table1 where col1 > 150
Please tell me how to wirte DAX syntax for that?
Thanks in advance,
Vladi
@PbiCeo ,
You can try like
summarize(filter(table,table[col1] > 150),table[col1] ,table[col2], table[col3])
in case of visual, you can put three columns on visual and put a visual level filter col1>150
@PbiCeo - Try:
New Table =
DISTINCT(
SELECTCOLUMNS(
FILTER('Table',[col1] > 150),
"col1",[col1],
"col2",[col2],
"col3",[col3]
)
)
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |