Forum Discussion
shavish
1 year agoHelper I
SQL query- Power query BI help
I have following query with 5 parameters. When i select all 5 parameters, i see the entry is shown in Power BI desktop. If any of the selection is missing, the values aren't shown. My requirement...
- 1 year ago
SELECT DISTINCT Name, Desc as Description, Category, Usage, No_of_Pages, Author, Confidential FROM Docsdb.dbo.tblProperty WHERE (CASE WHEN '" & Confidential_Flag &"'='1' AND Confidential='1' THEN 1 WHEN '" & Confidential_Flag &"='0' AND Confidential='0' THEN 0 ) AND ('" & Doc_Name &"' = '' OR Name = '" &Doc_Name &"') AND ('" & Doc_Desc &"' = '' OR Desc = '" &Doc_Desc &"') AND ('" & Category &"' = '' OR Category = '" &Category&"') AND ('" & Usage &"' = '' OR Usage = '" &Usage&"')You were wrapping the catergories in '' so blanks would of always been empty strings. Try the above
V-yubandi-msft
1 year agoCommunity Support
Hi shavish ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.