The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi everyone,
I'm new to Power BI and I'm having some trouble connecting to a PostgreSQL database and importing the data.
Background:
My question is: which is the most eficient way to filter this data?
Thanks in advance for your help!
Solved! Go to Solution.
Hello @Divinal_ThiagoP,
You could write a query that joins your target table with the date-containing table and filters based on the date:
SELECT t.*, d.date_field
FROM target_table t
JOIN date_table d ON t.date_id = d.id
WHERE d.date_field >= CURRENT_DATE - INTERVAL '2 years'
Hope this helps!
Hello @Divinal_ThiagoP,
You could write a query that joins your target table with the date-containing table and filters based on the date:
SELECT t.*, d.date_field
FROM target_table t
JOIN date_table d ON t.date_id = d.id
WHERE d.date_field >= CURRENT_DATE - INTERVAL '2 years'
Hope this helps!
User | Count |
---|---|
83 | |
83 | |
37 | |
34 | |
32 |
User | Count |
---|---|
92 | |
79 | |
61 | |
51 | |
51 |