Coder Social home page Coder Social logo

Data to columns about summarytable HOT 2 OPEN

fredrikheden avatar fredrikheden commented on August 23, 2024
Data to columns

from summarytable.

Comments (2)

fredrikheden avatar fredrikheden commented on August 23, 2024 1

Hi,
In order to use year as columns you need to first create a separate measure for each year using DAX, and then use those measures in separate columns.
/ Fredrik

from summarytable.

lucaliberty avatar lucaliberty commented on August 23, 2024

Hi Fredrik

I'm also completely new to Power BI and I think I'm having a similar issue to LtnMax. When I put the relevant fields into the field list - EOM (Year) and Revenue - and press 'Generate template from field list', the table created has the years as separate columns, and only one row (Revenue).

I'd like to flip this so the years are rows and the Revenue is a column. Below is some code I have written to try and fix this. This, however, shows the years along the top only (no revenue at all) please could you help me fix it?

Thanks
Luca

{
"columns": [
{
"headerStyle": "text-align:left",
"rowStyle": "text-align:left",
"width": 100,
"type": "RowHeader",
"refName": "[Revenue]",
"title": "",
"formula": "[Revenue]",
"format": ""
},
{
"headerStyle": "text-align:left",
"rowStyle": "text-align:left",
"width": 100,
"type": "RowHeader",
"refName": "[EOM (Year)]",
"title": "2019",
"formula": "[2019]",
"format": ""
},
{
"headerStyle": "text-align:left",
"rowStyle": "text-align:left",
"width": 100,
"type": "RowHeader",
"refName": "[EOM (Year)]",
"title": "2020",
"formula": "[2020]",
"format": ""
},
{
"headerStyle": "text-align:left",
"rowStyle": "text-align:left",
"width": 100,
"type": "RowHeader",
"refName": "[EOM (Year)]",
"title": "2021",
"formula": "[2021]",
"format": ""
}
],
"rows": [
{
"title": "Revenue",
"formula": "[Revenue]",
"rowStyle": "",
"visible": true,
"cellRowHeaderStyle": "",
"cellRowDataStyle": ""
}
],
"headerRow": {
"rowStyle": ""
},
"displayAllRows": false
}

from summarytable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.