cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ResearchDev
Helper II
Helper II

Simple but tricky and not sure.. is this even possible to be done?

I have managed to get to this data shown using a Paginated Report table, but only want the values in blue circles. Below is another table in crystal that shows the data that needs to be matched. The crystal report has a aging criteria that says <=180.  Is there a way to obtain the results in the blue circles?

 

SELECT distinct
T_SMPL.SMPL_ID,
T_SMPL.SMPL_MIX_ID,
T_SMPL.SMPL_DT,
TO_DATE(SMPL_DT,'YYYYMMDD') smpl_dt_disp,

to_date(:D) - TO_DATE(T_SMPL.SMPL_DT,'YYYYMMDD') Days_Between,
T_PCC.MIX_ID
FROM
SM_ADMIN.T_SMPL T_SMPL
INNER JOIN SM_ADMIN.T_PCC T_PCC ON T_SMPL.SMPL_MIX_ID = T_PCC.MIX_ID
WHERE
TO_DATE(SMPL_DT,'YYYYMMDD')<= (:D)
AND
(
'Z' IN (:MIXID) OR
T_PCC.MIX_ID IN (:MIXID)
)

ResearchDev_2-1658862585312.png

 

 

 

ResearchDev_1-1658862513791.png

 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @ResearchDev ,

 

1. Modeled in Power BI Desktop, uploaded to Service. then used the dataset as the data source and filtered it with DAX language.

2. Use hidden report parameters that have default values populated by a second dataset. Then use the hidden report parameters in the filter expression.

Sample parameter:

vkkfmsft_0-1659078806011.png    vkkfmsft_1-1659078825950.png
Filter Expression:

vkkfmsft_2-1659078884758.png

 

vkkfmsft_3-1659079060780.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
ResearchDev
Helper II
Helper II

Thanks so much for the help. I managed to get someone to assist on this who rewrote the entire thing using SQL instead. I will try to post that as well sometime. 

v-kkf-msft
Community Support
Community Support

Hi @ResearchDev ,

 

1. Modeled in Power BI Desktop, uploaded to Service. then used the dataset as the data source and filtered it with DAX language.

2. Use hidden report parameters that have default values populated by a second dataset. Then use the hidden report parameters in the filter expression.

Sample parameter:

vkkfmsft_0-1659078806011.png    vkkfmsft_1-1659078825950.png
Filter Expression:

vkkfmsft_2-1659078884758.png

 

vkkfmsft_3-1659079060780.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.