web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Hi, Howe can i get the...
Power Automate
Unanswered

Hi, Howe can i get the Json from Power BI

(0) ShareShare
ReportReport
Posted on by 20

Hi, 

How can i enter the value field with Json from the Power Bi Fields. I need to choose two fields from the query, which ae Norms and Code. Can you please help me?

When i tried to choose from the dropdown menu it gives me another loop, so How can i do it?

Ameer1_1-1667822021605.png

 

Thank you

 

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @Ameer1 

     

    Not sure this technique would work with Power BI or not, but this is how I usually deal with JSON data in Power Automate. Follow the following steps:

     

    • Save that dynamic field Power BI data in a compose action, though variable would also work.
    • Run the flow once.
    • After this copy the output you are getting in that compose from the run history.
    • After this edit the flow, and add new action called parse json.
    • In parse json, pass the output of above compose, and in the dynamic content paste the data you copied before. And click on done.
    • After this your dynamic fields Norms and Code would be available. You can use them in however way you like.

    You can watch the following videos to get more information:

     

    https://www.youtube.com/watch?v=vhkPrm64hMk

     

    https://www.youtube.com/watch?v=jg--Ivo9oRE

     

    If this solution works for you, you can mark it as the solution. And if you liked the explanation, you can give a thumbs up/kudo. It really helps. Thanks. 🙂

  • Ameer1 Profile Picture
    20 on at

    Hi Sundeep,

    Thank you. 

    But the Json format is not available. may be i can elaborate the details of my query.

    Export Power BI to MS Word / PDF | Paginated reports with Power Automate and Power BI - YouTube

    Ameer1_0-1667831219683.png

     

    I was following this video and at the minute 7:00, The value field is a Json, She copied it from somewhere. I have problem in this step.

     

     

  • Sundeep_Malik Profile Picture
    6,484 on at

    @Ameer1 

     

    I think currently you are sending everything from Power BI to Power Automate.

     

    You will have to first choose the fields you want to send to Power Automate, you will have to tick the values, that you want to send to Power Automate, or if you have to send everything, select everything. Then you can make the json structure that the person has done in the above video. Its pretty easy to make.

     

    So lets say you have 3 fields: name, id and address. Just write it as like this:

     

    {

    "Name": SelectDynamicFieldForName,

    "Id": SelectDynamicFieldForID,

    "Address": SelectDynamicFieldForAddress

    }

     

    Watch the following video for more reference, how you can select values from Power BI to pass to Power Automate:

     

    https://www.youtube.com/watch?v=qG01WDm5_Go

  • Ameer1 Profile Picture
    20 on at

    @Sundeep_Malik 

     

    I wanted to take two fields from Power BI. 

    I followed the format you sent (

    {

    "Name": SelectDynamicFieldForName,

    "Id": SelectDynamicFieldForID,

    "Address": SelectDynamicFieldForAddress

    }

    But when i select the every option i click, it automatically add an other loop(apply to each).

    Ameer1_0-1667834980478.png

    I think there is some small error, which i don't get it.

     

    Thank you.

     

  • Sundeep_Malik Profile Picture
    6,484 on at

    @Ameer1 

     

    Ok. Got it what she did in the video. Actually she might have directly copied the dynamic field values. But, I won't suggest the technique that she has used in the video.

    Instead do this:

     

    Initialize an empty array variable, don't add the Power BI Data dynamic field. Keep the value empty. 

     

    Then add an apply to each action, pass the Power BI Data dynamic field in that. Then use append to each variable. And pass each column in that while creating that JSON format. 

     

    There is one more technique, if this does not work, I will tell you that. 

  • Ameer1 Profile Picture
    20 on at

    @Sundeep_Malik 

    What's the other method? Didn't get that either. May be i could try the other way or the way she did.

    Thank you

     

  • Verified answer
    Sundeep_Malik Profile Picture
    6,484 on at

    Both Methods:

     

    1) Variable one:

     

    Initialize empty array variable like this:

     

    Sundeep_Malik_0-1667838927489.png

    And after this add apply to each and append to array action and make json data like below:

    Sundeep_Malik_1-1667839183992.png

     

     

    2) Select action:

     

    Do, something like below. On the right side, add item()['FieldName'] or item().FieldName or item()?FieldName.

    Whichever works for you.

    Sundeep_Malik_3-1667839444192.png

     

     

    If the above two methods dont work, I dont think I can help you any further.

  • Ameer1 Profile Picture
    20 on at

    @Sundeep_Malik 

     

    It works Finally! Thank you very much.

     

    Is there any way we can make a loop in power automate. I have many order codes and i want to make a file for every order code. So i would have to assign a loop function to the order code before generating the documents. is it possible?

     

    Thanks

  • Sundeep_Malik Profile Picture
    6,484 on at

    @Ameer1 

     

    Which method worked, variable or select one??

     

    There are two loops in power automate.

     

    Apply to each, which works like a for each loop.

     

    And 

     

    Do Until

     

    You can use apply to each for your case.

  • Ameer1 Profile Picture
    20 on at

    The first method (Variable) worked!

    For example, for two order code, I have data like this. Apply to each function before the generate document function would work? How would the apply to each function go to the next order code after generating the document?

    Thanks

    Order codeModelCodeRevDesriptionDirectiveNorms
    158SW BS LED1014567A MW 4000K4 CEI EN 605
    158SW BS LED1014567A MW 4000K2 CEI EN 605, 2009/125/C, CEI EN 605, CEI EN 605, CEI EN 605, 2009/125/C
    158SW BS LED1014567A MW 4000K36 EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU, EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU
    40160DL SanificaAria1014566A U19C90 D3K UV2 CEI EN 605, 2009/125/C, CEI EN 605, CEI EN 605, CEI EN 605, 2009/125/C
    40160DL SanificaAria1014566AU19C90 D3K UV36 EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU, EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU
    40160DL SanificaAria1014566AU19C90 DLK UV54 ISO 15714, EN 60335-2

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard