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.
Hello everyone,
I’m working on a supplier’s report where I am showing how much is the amount that we spent on each of them along the time. The values come from a single table where I have one column for the final amount, and another one without the VAT.
With the intention of showing my charts and measures with and without VAT, I have created 2 identical pages, using measures that use one or another from the previous column.
For instance:
*Purchases with VAT = sum('Prov'[Total])
*Purchases without vat = sum('Prov'[Base Imponible])
Idea: I would like to switch between those 2 columns with a simple button or slicer. This would allow me to avoid to have almost duplicated every single measure and to also avoid using 2 identical pages.
Is something like this possible?
Thanks!
@okusai3000 hi
Yes, it is posible from both slicer and button.
i am showing by slicer. follow my steps
step1:- Create table with your measure name which you want to replace.
like
slicer_table
Name Value
Purchases with VAT 1
Purchases without vat 2
Note:- create Value datatype as string.
=>create a slicer with slicer_table[Name] to select measure
step2:- Create one measure to identify what you selected in slicer.
selected_measure(vat or w vat) = if ( HASONEVALUE(slicer_table[Name]) , values(slicer_table[Value]) ,<else>)
=> in else part you can give default value(1 or 2) which you want to show when nothing is silected in slicer.
step3:- Create one new measure which you are going to use in your visuals.
Final_measure = if ( [selected_measure(vat or w vat)] = "1", [Purchases with VAT ], [Purchases without vat ] )
=>Now you can use Final_measure in your visuals insted of using [Purchases with VAT ] and [Purchases without vat ]. It will exchange your measures dynamically based on what you selected in slicer.
Hopefully this will work for you.
Regards
Novil
If I answer you question, please mark my post as solution.
Hello @okusai3000
Create a table 'MeasuresDefinition' with two columns:
Column1: MeasureID
Column2: MeasureName
MeasureID MeasureName
1 Purchases with VAT
2 Purchases without vat
Now create a slicer with the column MeasureName.
All the concerned visualizations should have
SWITCH(SELECTEDVALUE(MeasuresDefinition[MeasureID]),1,sum('Prov'[BaseImponible]),2,sum('Prov'[BaseImponible]))))
instead of,
sum('Prov'[Base Imponible]), or,
sum('Prov'[Base Imponible])
Regards
Adarsh
If I answer your question, please mark my post as a solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |