March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I need to either fill the blank values in the collumn "module ID" with the same number as the one that are filled or create a new collumn as shown in the picture.
In the below picture is is quite clear that the module name "Getoveralltopselling" has module ID 65, but because of bad data collection some of the rows with that module has not noted the module ID (This module is not the only case - There are more than 100 rows which has a module name but no ID, but some other row has that same module name but with an ID)
How do I tell Power BI to return the value the correct value in the module ID row (In this example 65)?
I have tried lookupvalue, but i cannot return 65 because the module name and the number 65 appears multiple times.
Afterwards I have another question.
I need to create a table with a collumn of all distinct values of the modules and another collumn with the specific modules ID.
Such that the first row would be
Module name - Module ID
Getoveralltopselling - 65
module 2 - 41
Module 3 - 32
Solved! Go to Solution.
Hi @Anonymous
I have done it other way around.
First, I created a reference table from the main table in Power Query:
Then, I removed duplicates post filtering out nulls
Then loaded the tables in Power BI and created relationship:
Used DAX to include the blank values
You may find the the sample pbix file here
Hope this solves the purpose!
Regards,
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
@Anonymous
Hi, you can accomplish this easily.
You can start by creating the calculated table with distinct values and based on that, lookup the unique id for each module to fill in the gaps in your main table.
Code for calculated table:
Table =
FILTER(
SUMMARIZE( MyTable,
MyTable[Module name],
MyTable[Module ID]
),
NOT ISBLANK( MyTable[Module ID] )
)
Code for ModuleID column:
Module ID Fix = LOOKUPVALUE('Table'[Module ID], 'Table'[Module name], MyTable[Module name])
Kind regards,
Razwan
Hi @Anonymous
I have done it other way around.
First, I created a reference table from the main table in Power Query:
Then, I removed duplicates post filtering out nulls
Then loaded the tables in Power BI and created relationship:
Used DAX to include the blank values
You may find the the sample pbix file here
Hope this solves the purpose!
Regards,
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Hi Vivran22
Sorry for the late reply, but thank you very much!
It worked like a charm!
Kind regards
Junior-BI-Assi
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |