Forum Discussion
conditional subscription
Greetings,
i want to add condition on a subscription, if there is no date, don't run the subscribtion.
what to do?
4 Replies
- fooddCommunity Champion
Would you please clarify your question as to what you refer as to a 'subscription'?
- Sahir_MaharajSuper User
Hello foodd,
You can achieve this functionality using a workaround by utilizing Power Automate along with Power BI's REST API.
Create a Flow in Power Automate:
- Create a Power Automate (Flow) that checks whether there is a date in your dataset that triggers the subscription.
- If the date is present, the Flow proceeds to the next step.
- If the date is not present, the Flow terminates without proceeding further.
Use the Power BI REST API:
- In Power Automate, use the "HTTP - HTTP" action to call the Power BI REST API to trigger the subscription only if the condition is met.
- You'll need to authenticate your Power BI account and generate a token for API authentication.
Configure the Power BI Subscription:
- Set up a Power BI subscription that triggers the Power Automate Flow.
Let me know if you might require further assistance.
- fooddCommunity Champion
Sahir_Maharaj , thank you for adding a scenario, however, the reply to rawandshoraa was a genuinely open and probing question so that members of the Forum are able to quickly offer appropriate advice or alternative logic. Is this an ask for help in creating a DAX expression? Is this an ask for help in setting up a Subscription to the Power BI Service? Is this an ask on how to set up a Security Group named "Subscription"? Is this an ask for assistance in constructing a Power Automate Flow? Etcetera.
I believe you understand my point.
- SalvadorBruzonNew Member
Sahir, kudos to you!
I have a similar situation with a bit more complex condition. Regarding point (3), isn't it Power Automate Flow the one triggering Power BI Subscription conditionally? it reads to me the other way around 🤔.
Thanks,