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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
UsePowerBI
Post Prodigy
Post Prodigy

Table visual with two columns: Measure Names and respective Measure Values?

Hello

 

I am asking again as I have not received any solution so far.

 

I want to create a table visual with the following columns:

One column is the name of the Measure

Second column is the ID of the Measure

Third column is the actual Value of the Measure

 

How can I create that? Do I need to create a new table first? Can you advise please? I suppose I need to first somehow link the name and ID of each Measure with the value of each Measure?

Can you please provide detailed steps as I am not familiar with these processes.

 

Thanks!

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @UsePowerBI,

As you descriptions, it sounds like you want to create a manual input value table based on measure metadata. (notice: measure does not exist id, you also not able to use functions or expression to get the measure names)

I think GENERATESERIES function should suitable for your requirement, it allows you to generate a table with a list of values, then you can use switch function to replace value based on its index field.

Customize table =
SELECTCOLUMNS (
    GENERATESERIES ( 1, 5, 1 ),
    "ID", [Value],
    "Name", SWITCH (
        [Value],
        1, "Meaure1",
        2, "Meaure2",
        3, "Meaure3",
        4, "Meaure4",
        5, "Meaure5"
    ),
    "Value", SWITCH (
        [Value],
        1, [Measure1],
        2, [Measure2],
        3, [Measure3],
        4, [Measure4],
        5, [Measure5]
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
vanessafvg
Super User
Super User

can you provide the data you are using and demonstrate exactly what you want with an example?  the clearer the information you give the easier it will be to provide a solution.   Do you need to create this data first or are you importing it?   Its not very clear.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I have the data table:

 

Country; Sales;

USA; 1000

UK;    300

DE; 800

FR; 500

ES; 0

SE; 100

 

I want to create the table visual:

Metric; Value;

Percentage of Countries with 0 Sales; 17%

Percentage of Countries with >100 Sales; 67%

 

Thanks

 

Please try these expressions (replacing Country with your actual table name):

 

Pct Sales > 100 = CALCULATE(COUNTROWS(Country), Country[Sales]> 100)/COUNTROWS(Country)
 
Pct Zero Sales = CALCULATE(COUNTROWS(Country), Country[Sales]=0)/COUNTROWS(Country)
 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I am not asking about the calculations. I am asking how to create that table visual.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.