Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ArvindKumar
New Member

Power BI Report builder

ArvindKumar_0-1696323328364.png


IN Datasource:snowflake I am getting the corrrect data but i m using same query in report builder i m not getting correct data in visualizations   showing irrelevant data .even parameters are correct only . below is the query ........

select 
Case (?)
When 'Settlement' Then "SettlementCCY" Else "SalesCCY"
End SalesCCY,
ROW_NUMBER() OVER(ORDER BY 
SalesCCY ASC) AS "Row#",
 
sum("sales_amt_USD") as USD_Sales_amt, sum("sales_amt_EUR") as EUR_Sales_amt,
sum("sales_amt_CCY2") as sales_amt_CCY2, sum("amt_payment_CCY2") amt_payment_CCY2,
sum("am_PaymentLocal") am_PaymentLocal,
sum("am_PaymentUSD") am_PaymentUSD, sum("am_PaymentEUR") am_PaymentEUR,
sum("ExpectedSettlement") ExpectedSettlement
 
from  v_pbi_credit_cards_report v
 
  inner join   
  (select "sk_AirlineMDM", max("external_user_id") as external_user_id from v_pbi_user_airline
  where ((select "in_Internal" from v_pbi_user_airline where 
"external_user_id" =(?)) = 0 and "external_user_id"=(?)) or ((select "in_Internal" from v_pbi_user_airline where 
"external_user_id" =(?)) = 1 and "sk_AirlineMDM" = (?))
  group by "sk_AirlineMDM"
  
  )
  b
  on v."sk_AirlineMDM" = b."sk_AirlineMDM"
 
where
Case (?)
When 'Billing' Then "BillingDay"
When 'Sales' Then "SalesDay"
When 'Settlement' Then "settlement_date"
End >=(?)
 
and 
Case (?)
When 'Billing' Then "BillingDay"
When 'Sales' Then "SalesDay"
When 'Settlement' Then "settlement_date"
End <= (?)
 
and "sk_SettlementSystem" in (SELECT VALUE FROM TABLE (SPLIT_TO_TABLE(?,',')))
 
group by 
SalesCCY
 
order by sum("sales_amt_USD") desc



1 REPLY 1
ArvindKumar
New Member

can anyone tell solution? why i m getting incorrect data ..there is no wrong in the query then why i m getting incorrect data in report builder? or it is the report builder issue Power BI Report builder 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.