English 中文(简体)
How to a dropdown list of element numbers in power bi using a table/matrix
原标题:

I have a column of structure elements, ie, 1, 1.1, 2, 2.1, 2.1.1. How would I get the numbers with multiple levels (1.1, 2.1, 2.1.1) to be under their parent element (1) (2) on power bi using the table or matrix feature?

I tried to create level columns where if there number is 3.1.1 it would be Level1: 3 Level2: 1 Level3: 1, but it would not work.

问题回答
  1. First extract the first character form the Text in Power Query

  2. Filter the Table to contain non-blanks using CalculateTable in DAX

  3. Take the Matrix visual and keep Two columns as rows

    let Source = Excel.Workbook(File.Contents("C:AshokPower BIStack OverflowData03jul23.xlsx"), null, true), Data_Sheet = Source{[Item="Data",Kind="Sheet"]}[Data], #"Promoted Headers" = Table.PromoteHeaders(Data_Sheet, [PromoteAllScalars=true]), #"Added Custom" = Table.AddColumn(#"Promoted Headers", "Custom", each if Text.Contains(Text.From([Number]), ".") then Text.Start(Text.From([Number]), 1) else "") in #"Added Custom"





相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签