Forum Discussion
Connection PowerBI with Python Script for Association Rules
- 2 years ago
the input variables should be defined from the user (e.g. Customer Type, Time Period etc) :
this info needs to be in the dataset. In other words, you can create slicers in Power BI for user input, such as Customer Type, Time Period. These slicers can be linked to your data so that it's filtered based on the user's choice.
It wouldn't let me share either a .pbix file or upload a .csv file, so I copied and pasted the information that is included in the dataframe.
| ACCOUNT_ID | BEGINTIME | Time_Period | GAME_GROUP_ID | NEW_OLD_GAME |
| 112541623 | 11/8/23 | 19 | 1928 | Old Game |
| 115543802 | 17/8/23 | 13 | 1928 | Old Game |
| 113374408 | 18/8/23 | 12 | 1928 | Old Game |
| 115160020 | 18/8/23 | 12 | 1928 | Old Game |
| 113912079 | 19/8/23 | 11 | 1928 | Old Game |
| 115469783 | 20/8/23 | 10 | 1928 | Old Game |
| 109318613 | 21/8/23 | 9 | 1928 | Old Game |
| 109498325 | 21/8/23 | 9 | 1928 | Old Game |
| 111936453 | 23/8/23 | 7 | 1928 | Old Game |
| 115831558 | 23/8/23 | 7 | 1928 | Old Game |
| 110365656 | 24/8/23 | 6 | 1928 | Old Game |
| 109498325 | 25/8/23 | 5 | 1928 | Old Game |
| 112022648 | 5/6/23 | 86 | 1366 | Old Game |
| 70331 | 28/6/23 | 63 | 1366 | Old Game |
| 112414583 | 11/7/23 | 50 | 1366 | Old Game |
| 110457715 | 13/8/23 | 17 | 1366 | Old Game |
| 110216708 | 7/8/23 | 23 | 7677 | New Game |
| 109935741 | 24/7/23 | 37 | 3500 | Old Game |
| 116582638 | 17/7/23 | 44 | 6386 | Old Game |
| 110261719 | 19/6/23 | 72 | 7257 | Old Game |
- AmiraBedh2 years ago
Super User
the input variables should be defined from the user (e.g. Customer Type, Time Period etc) :
this info needs to be in the dataset. In other words, you can create slicers in Power BI for user input, such as Customer Type, Time Period. These slicers can be linked to your data so that it's filtered based on the user's choice.
- NickFournogerak2 years agoFrequent Visitor
Ok. Let's stay for example at the time period that exists in the dataframe.
I have a slicer in powerbi from which user can make a selection.
The question is, how I can return this value as a parameter to the python script and make the script run with this variable?
- AmiraBedh2 years ago
Super User