cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
piotrkopti
Frequent Visitor

X rows of year and months in columns (many types of data per year and month)

Hello,

customer asked to provide with PowerBI report based on Excel 🙂 to show data aggregated by year, month and type. Important in this scenario is fact, that Types are not in raw data. I have some calculations based on dates (Type A: If date A > B then true else false, Type B: if date C > D then true else false ect.).

For example:

YearTypeMonth1Month2Month3Month4
2021A2154734
2021B4689
2021C54565464
2020A5464545546
2020B655466546
2019B645456564
2019C4566544

 

I struggle to achieve this, using table or matrix, is there any way to do this exactly like that?

So far I have something like this in matrix:

piotrkopti_0-1625061743988.png

but customer is asking for something more like he showed in excel table (arguing that his table gives more clarity about year to month changes).

 

1 ACCEPTED SOLUTION

Hi, @piotrkopti 

If you want to generate such a table, your column “Type” must be an actual column , which can be a column in a calculated table or a calculated column.

If it is a measure, I am afraid that it cannot be implemented at present, because the measure can only be applied to the value of the matrix.
If possible, try to convert it to a calculated column.

 

Best Regards,
Community Support Team _ Eason

 

View solution in original post

4 REPLIES 4
piotrkopti
Frequent Visitor

Any idea? I'm I able to do this?

Hi,  @piotrkopti 

Not clear what do you want?

If you just want the following matrix structure, please try to drag the year field to matrix ‘rows’ and the month field to matrix ‘cloumns’.

5.png

 

If it involves changes to the table structure, you may need to try some functions in the query editor such as Pivot ,Unpivot,Group by...

Please share your original data and your expected results directly in excel for further research.

 

 

Best Regards,
Community Support Team _ Eason

My raw data contains 6 dates for each row and some other data like customer name etc. Those "types" that I mentioned are not in the raw data. Those types are results of date fields comparassions.

I need to compare dates with each other to determine some dependencies.

For example:
if date A > B then Type A is 1, otherwise Type A is 0.

if date C > D then Type B is 1, otherwise Type B is 0.

if date E > F then Type C is 1, otherwise Type C is 0.

 

My customer wish to see this comparison as follows:

piotrkopti_0-1625205330417.png

 

Hi, @piotrkopti 

If you want to generate such a table, your column “Type” must be an actual column , which can be a column in a calculated table or a calculated column.

If it is a measure, I am afraid that it cannot be implemented at present, because the measure can only be applied to the value of the matrix.
If possible, try to convert it to a calculated column.

 

Best Regards,
Community Support Team _ Eason

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors