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

Don'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.

Reply
cromo
New Member

Date as a Value

Hi, 

I am trying to make a report where I have a Subject a score and the date of the test, 

 

So, I have my table

Subject_test:

Studentid SubjectID Subject Score Dateoftest

 

what I want to do is something similar to Pivot but i cant really add date as value what I want as a final imput is someting like this

                               SUBJECT 1

Student Id  || Subject 1 Score || Subject 1 Dateoftest ||....Subject N Score || Subject N Date of test||

 

I am able to add the score column since there are numbers but i cant add date column because it will count it.

 

 

can you help me with this?

 

thanks in advanced.

 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@cromo

 

The expected output looks kind of non-standard in my opinion. However you could follow the attached pbix to get it. You will duplicate one column and pivot twice in this case.

 

Capture.PNG

 



I am able to add the score column since there are numbers but i cant add date column because it will count it.

 


To avoid counting, you can apply another aggregate function like MAX or even not aggregated.

 

Capture.PNG

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee

@cromo

 

The expected output looks kind of non-standard in my opinion. However you could follow the attached pbix to get it. You will duplicate one column and pivot twice in this case.

 

Capture.PNG

 



I am able to add the score column since there are numbers but i cant add date column because it will count it.

 


To avoid counting, you can apply another aggregate function like MAX or even not aggregated.

 

Capture.PNG

Greg_Deckler
Super User
Super User

Can you post some sample data?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.