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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
BoerelzZ
New Member

IIS log files , convert queries to PowerBI

Hi,

 

I'm currently trying to create a small dashboard giving me an overview of details about IIS log files.

 

  • Views per application
  • top 20 urls
  • top 25 slowest urls
  • etc.

 

I know the SQL queries, but i don't know how i can convert them to Power BI.

 

For example the TOP 20 urls should be

 

SELECT TOP 20 	csuristem, 
		COUNT(*) AS Total, 
		MAX(timetaken) AS MaxTime, 
		AVG(timetaken) AS AvgTime 
	/* bytes-->	AVG(sc-bytes) AS AvgBytes */
FROM XXXX 
GROUP BY csuristem
ORDER BY Total DESC

and the top 25 slowest urls should be

 

SELECT TOP 25  
    csuristem as URL,  
    MAX(timetaken) As Max,  
    MIN(timetaken) As Min,  
    Avg(timetaken) As Average  
    FROM XXXX
GROUP BY URL  
ORDER By Average DESC 

Can anyone help me and push me in the right way on how to convert the queries to Power BI?

 

Thank you all in advance!

 

Kristof

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @BoerelzZ

 

This is reasonably easy.  Just start dragging your fieds to a matrix visual.

 

For all but your cs-uri-stem field, you should chose what happens to the field using the small down arrow at the end of the field in the Values area.  You can select, Average, Count, Max, Min etc.

 

Then for the Top/Bottom use the Visual Level Filters on your cs-uri-stem field to set the Top N or Bottom N (advanced settings)

 

matrix.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Employee
Employee

Hi @BoerelzZ

 

This is reasonably easy.  Just start dragging your fieds to a matrix visual.

 

For all but your cs-uri-stem field, you should chose what happens to the field using the small down arrow at the end of the field in the Values area.  You can select, Average, Count, Max, Min etc.

 

Then for the Top/Bottom use the Visual Level Filters on your cs-uri-stem field to set the Top N or Bottom N (advanced settings)

 

matrix.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

BoerelzZ
New Member

Hi,

 

I'm currently trying to create a small dashboard giving me an overview of details about IIS log files.

 

  • Views per application
  • top 20 urls
  • top 25 slowest urls
  • etc.

I know the SQL queries, but i don't know how i can convert them to Power BI.

 

For example the TOP 20 urls should be

 

SELECT TOP 20 	csuristem, 
		COUNT(*) AS Total, 
		MAX(timetaken) AS MaxTime, 
		AVG(timetaken) AS AvgTime 
	/* bytes-->	AVG(sc-bytes) AS AvgBytes */
FROM XXXX 
GROUP BY csuristem
ORDER BY Total DESC

and the top 25 slowest urls should be

 

SELECT TOP 25  
    csuristem as URL,  
    MAX(timetaken) As Max,  
    MIN(timetaken) As Min,  
    Avg(timetaken) As Average  
    FROM XXXX
GROUP BY URL  
ORDER By Average DESC 

Can anyone help me and push me in the right way on how to convert the queries to Power BI?

 

Thank you all in advance!

 

Kristof

I think this is a duplicate post and you should be able to merge/delete so we only have one topic

 

Here is the other one

 

https://community.powerbi.com/t5/Desktop/IIS-log-files-convert-queries-to-PowerBI/m-p/166160#U166160


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.