Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi Everyone,
Good day!
I would like to ask if there's a way to duplicate row values based on selected value.
Example:
I have table below with fruit value apple.
| ID | Fruit | FY |
| 1 | apple | SY2 |
I have a second table below that has empty value.
| ID | Fruit | FY |
What i want to happen is when apple is selected, it will automatically creates data in the second table as duplicate value to first table.
Expected result something below:
| ID | Fruit | FY |
| 1 | apple | SY2 |
| 1 | apple | SY1 |
| 1 | apple | SY3 |
Also, if nothing is selected from main table it will automatically clear the data from second table. Is this possible in POWER BI?
Thanks in advance.
Hi @devgian ,
In Power BI, you can achieve the behavior you described using DAX measures and slicers. You can create a slicer to select the fruit value from the first table, and based on the selected fruit, you can generate rows in the second table using DAX measures. However, Power BI does not have the ability to directly modify or insert rows into tables in the same way a database can. Instead, you can create calculated tables or generate data within visuals.
Here's a general outline of how you can achieve the behavior you described:
Create a Slicer:
Create a Measure to Filter Data:
Generate Rows in a Table:
This measure generates rows in the "Second Table" based on the selected fruit. If nothing is selected (blank), it returns a blank result.
Visualize the Second Table:
Clear Data When Nothing is Selected:
With this setup, when a user selects a fruit in the slicer, the "Second Table" will display the corresponding rows. If nothing is selected, the "Second Table" will be blank.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 38 | |
| 35 | |
| 23 |