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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply

Download Multiple files in one button

Hello everyone.

 

Basically I have a table with the following content: Indicator, Store, Month, State, Numerator, Denominator, Result, Max Points, Current Points.

 

Where Numerator and Denominator are dependant on the Indicator, something like this: 

Henrique_Quint_0-1738001022540.png


And based on this table, I have a measure Z that basically does the same thing as Result, but non dependant on the table. Now I have a matrix that shows: INDICATOR, Z, CURRENT POINT, MAX POINT. But the problem is: it returns the SUM of current points, not the actual Current Points (not discriminated by Store)

Now I present to you, a fork that I'm facing in the development of this dashboard and there is two paths that I can take.


Path A: I create a measure to return Current Points of Z (not the sum of it)
Path B: I create a button that downloads the Matrix for all stores.

Problem is: I don't know how to do both, can anyone here help me out?

If I didn't make myself clear, I can link a mockup pbix file to help!

1 REPLY 1
v-jtian-msft
Community Support
Community Support

Hi,@Henrique_Quint .I am glad to help you.

1. For the first requirement, I think you want measure Z to return results that are grouped according to specific fields.

You can try to use the ALLEXCEPT() function to specify the field, so that the calculation environment of the measure is affected by the specific field (similar to the effect of grouping)
like this.

ALLEXCEPT function (DAX) - DAX | Microsoft Learn

CurrentPointsZ = 
CALCULATE(
    SUM('YourTable'[Current Points]),
    ALLEXCEPT('YourTable', 'YourTable'[Store])
)



Alternatively, grouping can be achieved with the var parameter + ALL() function

FieldCount = 
VAR _selected =
    MAX ( 'Parameter'[Parameter] ) //Get the current value of each line in visual
RETURN
    CALCULATE (
        COUNT ( 'UnpivotedDetail table'[Attribute] ),
        FILTER (
            'UnpivotedDetail table',
            'UnpivotedDetail table'[Attribute] = _selected
             
        )
    )

2. For the second requirement, unfortunately the power bi report does not support the direct insertion of a button that can export data functionality.
You can try to use visual export data instead.

URL:
Solved: How to create a download button in a report on Pow... - Microsoft Fabric Community
 If my understanding is wrong, please let me know and provide me with the corresponding pbix file detailing what you did and a screenshot of the expected result.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors