Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Some columns in the data table looks like below - I want to combine the values in two columns into one (if “Name” is not duplicated, joint it with “ID number”, otherwise show “-“)
I am using Excel as example to describe what I mean.
As there’s no COUNTIF in PowerBI, I don't know how to do it in DAX.
Can you please help me? Thank you.
Solved! Go to Solution.
Hi @JohnDahis ,
I have got following sample data:
Then I created following columns using DAX in Power BI:
Hi @JohnDahis ,
On what rule you want to keep the one instance? Is it ID or random or some other value in your data?
If it a single row against a NAME, you can get it in the table visual as follows:
On ID column, right click and Select LAST option.
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Thanks,
Pragati
Hi @JohnDahis ,
I have got following sample data:
Then I created following columns using DAX in Power BI:
Thank you for your help and guidance
is there a way to keep one instance of the duplicates (either one)?
Thanks again.
Hi @JohnDahis ,
On what rule you want to keep the one instance? Is it ID or random or some other value in your data?
If it a single row against a NAME, you can get it in the table visual as follows:
On ID column, right click and Select LAST option.
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Thanks,
Pragati
I meant, to have a DAX way to show either occurrence. The table is used as a data source.
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |