Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi folks,
I have a query which needs to be implemented in Power BI.
I have two tables. MARTSITEMS and DIM_Date
I want to inner join both the tables and get a aggregated table for Monthly. After getting this aggreagted table, I also want to use slicers from MARTITEMS so that slice and dice will also happen on aggreagted table. I dont know whether to use M code or DAX to perform this query. Please help.
Below is the query:
select dt.date, count(distinct kunnr), sum(dmbtr) as total_receivables,
sum(case when dt.date > di.duedate then di.dmbtr else 0 end) as Total_overdue,
Total_overdue/total_receivables as overdue_percent,
1-overdue_percent as not_due_percent,
from DEV_MARTSITEMS di
inner join (select last_day_month as date from DEV_DIM_DATE
group by last_day_month) dt
on (dt.date between di.budat and di.augdt ) or (di.augdt is null and dt.date >= di.budat)
where dt.date >= add_months(current_date(), -14) and dt.date <= current_date()
group by dt.date
order by dt.date asc;
Expected output; This table visualization should also slice and dice according to filters applied by user
No need for either M or DAX. Let the data model do the work for you. Something akin to an inner join is achieved by filtering out blanks from both tables.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |