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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
marcp2
Frequent Visitor

Pivot table and Time intelligence in Direct Query mode

Hi

Happy new year every one 🙂

 

I've a table I want to show in a matrix table

The key points :

  • I'm in direct query mode.
  • I need to compare data count with the same period of the previous year

My data model is simple :

Date (date time)Year (integer)Class (text)Id (text)

The date field contains only the first day of each month.

I have to classes : Class A and Class B

Measures :

  • Result current year=DISTINCTCOUNT (Id)
  • Result previous year=CALCULATE(DISTINCTCOUNT (Id),SAMEPERIODLASTYEAR(Date))

 

I simply need to show table in a matrix (like a pivot table in Excel). Something like this

YearMonthClass A current year

Class A

previous year

Class B

current year

Class B

previous year

2017 10095200210
 01/01/201710121228
 01/02/2017841513
 ...............

 

It does not work properly : I got this

YearMonthClass A current year

Class A

previous year

Class B

current year

Class B

previous year

2017     
 01/01/201710 12 
 01/02/20178 15 
 ...............

 

But if I do not show the year, it works :

MonthClass A current year

Class A

previous year

Class B

current year

Class B

previous year

01/01/201710121228
01/02/2017841513
...............

 

I know there are limitations in direct query mode 

However question seems simple.

 

Any idea ?

Thanks for your help

Regards

Marc

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @marcp2 ,
 
I think you would have to create it for yourself by making columns [year], [quarter],[month],[date] and then use them to create a hierarchy.
You can learn about modeling and reporting limitations of direct query connections in this document:
 
Best Regards,
Liang
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

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @marcp2 ,
 
I think you would have to create it for yourself by making columns [year], [quarter],[month],[date] and then use them to create a hierarchy.
You can learn about modeling and reporting limitations of direct query connections in this document:
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jthomson
Solution Sage
Solution Sage

If it's not something as simple as having subtotals, or some other form of totals, on your matrix turned off, and/or your date hierarchy not working problem, then I don't really know

Thank you @jthomson for having tried 🙂

Marc

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.