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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Inconsistent Data Quer...
Power Apps
Unanswered

Inconsistent Data Query Results

(0) ShareShare
ReportReport
Posted on by 62

I'm attempting to set up a Data Flow for Powerbi.  Relying on the guides that are out there, I'm connecting to the Common Data Service and providing the URL of our Dynamics 365 Environment.

I selected the Opportunities Entity from the available options. this all seems to go fine and I'm able to map to the standard CDS Opportunity Entity type.  

I then proceed to edit the query to remove some of the columns that I do not need. 

I added one conditional column that set its value depending on the presenced of an originatingLeadID value.

All this seems to work without issue.

On several fields and in particular the "opportunityRatingCode_display" the values are not simply not present at the end of the applied transformation steps.  I know of one opportunity that I'm testing with the value should be "Medium", however at the end of my transformations, the value in the field is "null".

 

IF, however, I apply a column filter prior to my "remove column steps" to limit the result set to the single opportunity, I _will_ have the correct Opportunity Rating in the field.  (i.e. Filter opportunityID = XXX)

 

We have 2,266 opportunities in the data set at present, I'm guessing this is having some impact?  I don not have incremental refresh in my license (Power BI pro). 

I do not believe my transformations are "at fault".  They are very simple:

  1. Source
  2. Navigation
  3. Map to Standard
  4. Removed Columns (getting rid of all the "_base" columns)
  5. Removed Other Columns (selecting just the desired columns)
  6. Add Conditional column
  7. Change Type (on the conditional column to Text)
  8. Rename Columns

If I insert a filter step between 3 & 4, the Opportunity Rating field is correct both at that level and at step 8.  If I only inset the filter step at the end, the Opportunity Rating field is "null"

 

Any insight would be appreciated. Thanks!

I have the same question (0)
  • jcnickell Profile Picture
    62 on at

    Okay a little more insight as I'm trying to look into this.  

    If I add the Filter Row transformation AFTER the Conditional Column I get the "null" value.

    If the filter Row comes BEFORE the conditional column, I do not loose Opportunity Rating

     

    So here's the code of the Conditional column when it comes "before" the Filter Row and causes the issue

     

    = Table.AddColumn(#"Removed Other Columns", "Source", each if [originatingLeadId] = null then "Direct" else if [originatingLeadId] <> null then "Lead" else "undetermined")
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @jnickell ,

    Could you please share a screenshot about the issue within your app?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Currently, I could not reproduce your issue on my side.

     

    If you would like to get further help within this issue, please consider open an thread within the Power BI forum:

    https://community.powerbi.com/t5/Forums/ct-p/PBI_Comm_Forums

     

    Best regards,

  • jcnickell Profile Picture
    62 on at

    I did post a question on the Power BI Forums, the response so far has been to open a support ticket.  
    I've added some screenshots to illustrate what I'm seeing.

     

    capture20190711095841439.png

     

    The transformation command for the "Removed Columns" is:

    Table.RemoveColumns(#"Renamed Columns", {"_r_bespoke_deisgnlevel", "_r_new_marketclassfication", "_r_opportunityRatingCode"})

    capture20190711095914074.png

     

    I would note that when I first went to reproduce the issue for you that I tried adding the remove columns at the end of my transformations (after the Merge queries) and the issue did not present itself there. 

     

    Here's the thread I opened on the Power BI community forums

    https://community.powerbi.com/t5/Desktop/M-Query-amp-Common-Data-Service-data-loss/m-p/736725#M355299

  • jcnickell Profile Picture
    62 on at

    Unfortunately, I was unable to reproduce the issue while on the phone with support.  Bummer. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard